/* ============================================
   ACCOUNT PAGE STYLES
   The Coconut Saraih Hotel
   ============================================ */

/* ============================================
   ACCOUNT SECTION
   ============================================ */
.account-section {
    padding: 4rem 2rem;
    background: #fafafa;
    min-height: 70vh;
}

.account-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============================================
   AUTH FORMS (LOGIN/REGISTER)
   ============================================ */
.auth-forms {
    max-width: 500px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f8f9fa;
}

.auth-tab {
    padding: 1.25rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab.active {
    background: #ffffff;
    color: var(--primary-dark);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gold);
}

.auth-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.5);
}

/* ============================================
   AUTH FORM
   ============================================ */
.auth-form {
    padding: 2.5rem;
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

#forgot-password-form.active {
    background: linear-gradient(135deg, #fffef8 0%, #fff 100%);
    border: 2px solid var(--primary-gold);
    margin: 10px;
    border-radius: 12px;
}

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

.auth-form h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.auth-form > p {
    color: #666;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

.form-group small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-extras {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-gold);
}

.forgot-password {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    background: rgba(212, 181, 110, 0.3);
    border-radius: 4px;
    border: 1px solid var(--primary-gold);
}

.forgot-password:hover {
    color: #fff;
    text-decoration: underline;
    background: var(--primary-gold);
    color: #000;
}

.btn-submit {
    width: 100%;
    padding: 1.125rem;
    background: linear-gradient(135deg, var(--primary-gold), #d4b56e);
    color: var(--primary-dark);
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 97, 0.35);
}

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

/* ============================================
   SOCIAL LOGIN
   ============================================ */
.social-login {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}

.social-login p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.social-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-social {
    padding: 0.875rem;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-social:hover {
    border-color: var(--primary-gold);
    background: rgba(201, 169, 97, 0.05);
}

.btn-social.google {
    color: #DB4437;
}

.btn-social.facebook {
    color: #4267B2;
}

/* ============================================
   USER DASHBOARD
   ============================================ */
.user-dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    min-height: 600px;
}

/* ============================================
   DASHBOARD SIDEBAR
   ============================================ */
.dashboard-sidebar {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.user-profile {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-gold), #d4b56e);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2.5rem;
    color: var(--primary-dark);
}

.user-profile h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.user-profile p {
    color: #666;
    font-size: 0.9rem;
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dashboard-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: #666;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dashboard-nav .nav-item:hover {
    background: rgba(201, 169, 97, 0.1);
    color: var(--primary-dark);
}

.dashboard-nav .nav-item.active {
    background: linear-gradient(135deg, var(--primary-gold), #d4b56e);
    color: var(--primary-dark);
    font-weight: 600;
}

.dashboard-nav .nav-item.logout {
    margin-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 1.5rem;
    color: #dc3545;
}

.dashboard-nav .nav-item.logout:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* ============================================
   DASHBOARD CONTENT
   ============================================ */
.dashboard-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

.dashboard-tab {
    display: none;
}

.dashboard-tab.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dashboard-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-gold);
}

.dashboard-content h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

/* ============================================
   STATS GRID
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 1rem;
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.stat-card p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   BOOKINGS SECTION
   ============================================ */
.recent-bookings {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
}

.bookings-filter {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background: #ffffff;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-gold);
    background: rgba(201, 169, 97, 0.05);
}

.filter-btn.active {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-dark);
}

.bookings-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.booking-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.booking-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.booking-image {
    width: 150px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
}

.booking-details h4 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.booking-details p {
    font-size: 0.9rem;
    color: #666;
    margin: 0.25rem 0;
}

.booking-status {
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.booking-status.confirmed {
    background: #d4edda;
    color: #155724;
}

.booking-status.pending {
    background: #fff3cd;
    color: #856404;
}

.booking-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.booking-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    background: transparent;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-action:hover {
    background: var(--primary-gold);
    border-color: var(--primary-gold);
    color: var(--primary-dark);
}

.no-bookings {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-bookings a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
}

.no-bookings a:hover {
    text-decoration: underline;
}

/* ============================================
   PROFILE FORM
   ============================================ */
.profile-form .form-group {
    margin-bottom: 1.25rem;
}

/* ============================================
   SETTINGS SECTION
   ============================================ */
.settings-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.settings-section .checkbox-label {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.settings-section .checkbox-label:last-child {
    border-bottom: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1200px) {
    .user-dashboard {
        grid-template-columns: 250px 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .user-dashboard {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .booking-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .booking-image {
        width: 100%;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .account-section {
        padding: 2rem 1rem;
    }

    .auth-forms {
        max-width: 100%;
    }

    .auth-form {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .dashboard-content {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .bookings-filter {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .auth-form h2 {
        font-size: 1.5rem;
    }

    .dashboard-content h2 {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-card h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.dashboard-nav .nav-item {
    animation: slideIn 0.3s ease forwards;
}

.dashboard-nav .nav-item:nth-child(1) { animation-delay: 0.1s; }
.dashboard-nav .nav-item:nth-child(2) { animation-delay: 0.2s; }
.dashboard-nav .nav-item:nth-child(3) { animation-delay: 0.3s; }
.dashboard-nav .nav-item:nth-child(4) { animation-delay: 0.4s; }
.dashboard-nav .nav-item:nth-child(5) { animation-delay: 0.5s; }

/* ============================================
   NOTIFICATION STYLES
   ============================================ */
.notification {
    position: fixed;
    top: 100px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-left: 4px solid var(--primary-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.notification.success {
    border-left-color: #27ae60;
}

.notification.error {
    border-left-color: #dc3545;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.loading i {
    font-size: 2rem;
    color: var(--primary-gold);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   FORM VALIDATION STYLES
   ============================================ */

/* Input wrapper for password toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 45px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: var(--primary-gold);
}

/* Input validation states */
.form-group input.error,
.form-group select.error {
    border-color: #dc3545 !important;
}

.form-group input.valid,
.form-group select.valid {
    border-color: #28a745 !important;
}

/* Error message */
.error-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Password strength meter */
.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.strength-fill {
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
}

/* Focus states for accessibility */
.form-group input:focus,
.form-group select:focus {
    outline: 2px solid var(--primary-gold);
    outline-offset: 2px;
}

.form-group input.error:focus {
    outline-color: #dc3545;
}

.form-group input.valid:focus {
    outline-color: #28a745;
}

/* ============================================
   FORGOT PASSWORD FORMS
   ============================================ */

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.form-footer a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.resend-code {
    text-align: center;
    margin-top: 1rem;
}

.resend-code p {
    color: #666;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.resend-code a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: 600;
}

.resend-code a:hover {
    text-decoration: underline;
}

.resend-code .timer {
    color: #999;
    font-size: 0.85rem;
}

/* Verification code input styling */
#verification-code {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    letter-spacing: 0.5rem;
    font-size: 1.25rem !important;
}

/* ============================================
   MODAL STYLES
   ============================================ */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 16px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

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

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 2rem;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-dark);
}

.modal-content h2 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-gold);
}

.modal-body {
    color: #666;
    line-height: 1.8;
}

.modal-body h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-content .btn-submit {
    margin-top: 2rem;
}
