* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%);
    min-height: 100vh;
}

/* ===== Auth Screen (reuses login.css patterns) ===== */
.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 400px;
    width: 90%;
    z-index: 10;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h1 {
    color: #1e3a8a;
    font-size: 2rem;
    font-weight: 600;
    margin-top: 20px;
}

.logo {
    max-width: 320px;
    height: auto;
    margin-bottom: 10px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #1e3a8a;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.login-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e8ed;
}

.login-footer p {
    color: #666;
    font-size: 0.9rem;
}

/* Background animation (same as login) */
.background-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    animation: cloudFloat 8s ease-in-out infinite;
    border-radius: 50px;
    opacity: 0.6;
}

.floating-element:nth-child(1) {
    width: 100px; height: 40px; top: 15%; left: 8%;
    animation-delay: 0s; border-radius: 40px;
    box-shadow: -25px 0 0 -5px rgba(255,255,255,0.15), 25px 0 0 -5px rgba(255,255,255,0.15);
}
.floating-element:nth-child(2) {
    width: 140px; height: 50px; top: 55%; right: 15%;
    animation-delay: 3s; border-radius: 50px;
    box-shadow: -35px 0 0 -8px rgba(255,255,255,0.15), 35px 0 0 -8px rgba(255,255,255,0.15);
}
.floating-element:nth-child(3) {
    width: 80px; height: 35px; bottom: 25%; left: 15%;
    animation-delay: 6s; border-radius: 35px;
    box-shadow: -20px 0 0 -3px rgba(255,255,255,0.15), 20px 0 0 -3px rgba(255,255,255,0.15);
}
.floating-element:nth-child(4) {
    width: 60px; height: 25px; top: 80%; right: 35%;
    animation-delay: 1s; border-radius: 25px;
    box-shadow: -15px 0 0 -2px rgba(255,255,255,0.15), 15px 0 0 -2px rgba(255,255,255,0.15);
}
.floating-element:nth-child(5) {
    width: 110px; height: 45px; top: 35%; right: 5%;
    animation-delay: 4s; border-radius: 45px;
    box-shadow: -30px 0 0 -5px rgba(255,255,255,0.15), 30px 0 0 -5px rgba(255,255,255,0.15);
}

@keyframes cloudFloat {
    0%, 100% { transform: translateY(0px) translateX(0px); opacity: 0.4; }
    25% { transform: translateY(-15px) translateX(5px); opacity: 0.7; }
    50% { transform: translateY(-25px) translateX(-5px); opacity: 0.8; }
    75% { transform: translateY(-10px) translateX(3px); opacity: 0.6; }
}

/* ===== Messages ===== */
.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #fcc;
    display: none;
}

.success-message {
    background: #efe;
    color: #2d7a2d;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    border: 1px solid #cfc;
    display: none;
}

/* ===== Dashboard ===== */
.dashboard {
    min-height: 100vh;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo {
    height: 36px;
    width: auto;
}

.dashboard-header h1 {
    color: #1e3a8a;
    font-size: 1.4rem;
    font-weight: 600;
}

.logout-btn {
    background: none;
    border: 2px solid #e1e8ed;
    padding: 8px 20px;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    border-color: #c33;
    color: #c33;
}

/* ===== Content ===== */
.dashboard-content {
    max-width: 960px;
    margin: 32px auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card h2 {
    color: #1e3a8a;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-header h2 {
    margin-bottom: 0;
}

.coach-count {
    color: #666;
    font-size: 0.85rem;
}

/* ===== Add Coach Form ===== */
.add-coach-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ===== Buttons ===== */
.action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1e3a8a 100%);
    color: white;
}

.primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.toggle-btn {
    background: #f0f0f0;
    color: #666;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.toggle-btn:hover:not(:disabled) {
    background: #e0e0e0;
}

.remove-btn {
    background: none;
    border: 1px solid #e1e8ed;
    color: #c33;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.remove-btn:hover:not(:disabled) {
    background: #fee;
    border-color: #fcc;
}

/* ===== Coaches Table ===== */
.coaches-table {
    width: 100%;
    border-collapse: collapse;
}

.coaches-table th {
    text-align: left;
    padding: 10px 12px;
    color: #666;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e1e8ed;
}

.coaches-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.coaches-table tr:last-child td {
    border-bottom: none;
}

.coach-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.coach-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.coach-display-name {
    font-weight: 500;
    color: #1e3a8a;
}

/* ===== Status Badge ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fef2f2;
    color: #991b1b;
}

/* ===== Action Buttons Cell ===== */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* ===== Loading / Empty ===== */
.loading {
    text-align: center;
    padding: 32px;
    color: #666;
    font-size: 0.95rem;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: #999;
    font-size: 0.95rem;
}

/* ===== View Button ===== */
.view-btn {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 6px 14px;
    font-size: 0.8rem;
}

.view-btn:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #93c5fd;
}

/* ===== Coach Profile Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 0;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e1e8ed;
}

.profile-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-header-info h2 {
    color: #1e3a8a;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.profile-details {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.profile-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}

.profile-value {
    font-size: 0.95rem;
    color: #333;
}

.specialty-tag {
    display: inline-block;
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 2px 4px 2px 0;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .login-card {
        padding: 30px 20px;
        margin: 20px;
    }

    .logo {
        max-width: 200px;
    }

    .dashboard-header {
        padding: 12px 16px;
    }

    .dashboard-header h1 {
        font-size: 1.1rem;
    }

    .dashboard-content {
        padding: 0 12px;
        margin: 16px auto;
    }

    .form-row {
        flex-direction: column;
    }

    .coaches-table th:nth-child(4),
    .coaches-table td:nth-child(4) {
        display: none;
    }

    .action-buttons {
        flex-direction: column;
    }
}
