/* =====================
   Auth Navigation Bar
   ===================== */
.auth-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 9998;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 24px;
    background: rgba(255, 245, 230, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    gap: 12px;
    transition: transform 0.3s ease;
}

.auth-nav.hidden {
    transform: translateY(-100%);
}

.auth-nav-guest,
.auth-nav-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-nav-user {
    display: none;
}

.auth-nav.logged-in .auth-nav-guest {
    display: none;
}

.auth-nav.logged-in .auth-nav-user {
    display: flex;
}

.auth-nav-greeting {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    color: var(--deep-ocean);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.auth-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.auth-btn-signin {
    background: transparent;
    color: var(--deep-ocean);
    border: 2px solid var(--warm-orange);
}

.auth-btn-signin:hover {
    background: var(--warm-orange);
    color: white;
}

.auth-btn-register {
    background: linear-gradient(135deg, var(--warm-orange), var(--soft-coral));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.auth-btn-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.auth-btn-dashboard {
    background: linear-gradient(135deg, var(--tropical-teal), var(--palm-green));
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.auth-btn-dashboard:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.auth-btn-signout {
    background: transparent;
    color: #999;
    border: 2px solid #ddd;
    padding: 8px 16px;
}

.auth-btn-signout:hover {
    border-color: var(--soft-coral);
    color: var(--soft-coral);
}

/* Push page content down so it doesn't hide behind fixed nav */
body.has-auth-nav {
    padding-top: 60px;
}

/* =====================
   Auth Modals (Signup & Login)
   ===================== */
.auth-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: white;
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    position: relative;
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: #f5f5f5;
    color: var(--deep-ocean);
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal-header h2 {
    font-family: 'Baloo 2', cursive;
    font-size: 1.6rem;
    color: var(--deep-ocean);
    margin-bottom: 6px;
}

.auth-modal-header p {
    color: #888;
    font-size: 0.9rem;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--deep-ocean);
    margin-bottom: 6px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s;
    outline: none;
}

.auth-form-group input:focus {
    border-color: var(--warm-orange);
}

.auth-form-group input.error {
    border-color: var(--soft-coral);
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 44px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--warm-orange);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--warm-orange), var(--soft-coral));
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.4);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-error-msg {
    background: #fff0f0;
    color: var(--soft-coral);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 14px;
    display: none;
    text-align: center;
}

.auth-error-msg.show {
    display: block;
}

.auth-modal-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.85rem;
    color: #888;
}

.auth-modal-footer a {
    color: var(--warm-orange);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.auth-modal-footer a:hover {
    text-decoration: underline;
}

.auth-forgot-link {
    display: block;
    text-align: right;
    font-size: 0.8rem;
    color: var(--warm-orange);
    text-decoration: none;
    margin-top: -10px;
    margin-bottom: 14px;
    cursor: pointer;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

/* =====================
   Dashboard Page Styles
   ===================== */
.dashboard-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

.dashboard-welcome {
    background: linear-gradient(135deg, var(--warm-orange), var(--soft-coral));
    color: white;
    padding: 35px 30px;
    border-radius: 24px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(255, 140, 66, 0.3);
}

.dashboard-welcome h1 {
    font-family: 'Baloo 2', cursive;
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.dashboard-welcome p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.dashboard-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 10px;
}

.dashboard-status-badge.complete {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

.dashboard-status-badge.incomplete {
    background: rgba(255, 255, 255, 0.25);
    color: #FFD166;
}

.dashboard-status-badge.pending {
    background: rgba(255, 140, 66, 0.2);
    color: #FF8C42;
}

.dashboard-status-badge.waitlisted {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.dashboard-status-badge.rejected {
    background: rgba(255, 107, 107, 0.15);
    color: #FF6B6B;
}

/* Summary Cards */
.dashboard-section {
    background: white;
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.dashboard-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f5f5f5;
}

.dashboard-section-header h2 {
    font-family: 'Baloo 2', cursive;
    font-size: 1.2rem;
    color: var(--deep-ocean);
}

.dashboard-edit-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 6px 16px;
    border-radius: 50px;
    border: 2px solid var(--warm-orange);
    background: transparent;
    color: var(--warm-orange);
    cursor: pointer;
    transition: all 0.3s;
}

.dashboard-edit-btn:hover {
    background: var(--warm-orange);
    color: white;
}

.dashboard-field {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f9f9f9;
    font-size: 0.9rem;
}

.dashboard-field:last-child {
    border-bottom: none;
}

.dashboard-field-label {
    font-weight: 600;
    color: #888;
    min-width: 160px;
    flex-shrink: 0;
}

.dashboard-field-value {
    color: var(--deep-ocean);
    word-break: break-word;
}

.dashboard-child-card {
    background: #fafafa;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 12px;
}

.dashboard-child-card h4 {
    font-family: 'Baloo 2', cursive;
    color: var(--warm-orange);
    margin-bottom: 10px;
}

/* Document Upload Area */
.dashboard-upload-area {
    border: 2px dashed #ddd;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.dashboard-upload-area:hover,
.dashboard-upload-area.dragover {
    border-color: var(--warm-orange);
    background: rgba(255, 140, 66, 0.04);
}

.dashboard-upload-area p {
    color: #888;
    font-size: 0.9rem;
    margin-top: 8px;
}

.dashboard-upload-area .upload-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.upload-progress {
    margin-top: 12px;
    display: none;
}

.upload-progress-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--warm-orange), var(--soft-coral));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s;
}

.upload-progress-text {
    font-size: 0.8rem;
    color: #888;
    margin-top: 4px;
}

/* Document List */
.document-list {
    list-style: none;
}

.document-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #fafafa;
    border-radius: 12px;
    margin-bottom: 8px;
}

.document-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.document-item-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.document-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--deep-ocean);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.doc-action-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.doc-action-btn:hover {
    background: #eee;
}

.doc-action-btn.delete:hover {
    background: #ffe0e0;
}

/* Dashboard Action Buttons */
.dashboard-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.dashboard-action-btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
    min-width: 180px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.dashboard-action-btn.primary {
    background: linear-gradient(135deg, var(--warm-orange), var(--soft-coral));
    color: white;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.3);
}

.dashboard-action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 140, 66, 0.4);
}

.dashboard-action-btn.secondary {
    background: linear-gradient(135deg, var(--tropical-teal), var(--palm-green));
    color: white;
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.3);
}

.dashboard-action-btn.secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(78, 205, 196, 0.4);
}

.dashboard-action-btn.outline {
    background: transparent;
    color: var(--deep-ocean);
    border: 2px solid #ddd;
}

.dashboard-action-btn.outline:hover {
    border-color: var(--soft-coral);
    color: var(--soft-coral);
}

/* Empty state */
.dashboard-empty {
    text-align: center;
    padding: 40px;
    color: #888;
}

.dashboard-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.dashboard-empty p {
    font-size: 0.95rem;
    margin-bottom: 16px;
}

/* Loading spinner for dashboard */
.dashboard-loading {
    text-align: center;
    padding: 60px 20px;
}

.dashboard-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top-color: var(--warm-orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Inline editing */
.inline-edit-input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--warm-orange);
    border-radius: 8px;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9rem;
    outline: none;
}

.inline-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.inline-edit-actions button {
    font-family: 'Nunito', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
}

.inline-edit-actions .save-btn {
    background: var(--warm-orange);
    color: white;
}

.inline-edit-actions .cancel-btn {
    background: #eee;
    color: #666;
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 600px) {
    .auth-nav {
        padding: 10px 14px;
        gap: 8px;
    }

    .auth-btn {
        font-size: 0.78rem;
        padding: 6px 14px;
    }

    .auth-nav-greeting {
        max-width: 100px;
        font-size: 0.8rem;
    }

    .auth-modal {
        padding: 28px 22px;
        width: 95%;
        border-radius: 18px;
    }

    .dashboard-field {
        flex-direction: column;
        gap: 2px;
    }

    .dashboard-field-label {
        min-width: auto;
        font-size: 0.8rem;
    }

    .dashboard-actions {
        flex-direction: column;
    }

    .dashboard-action-btn {
        min-width: auto;
    }
}
