/* --- Import Font --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- Luxury Spa Color Palette --- */
:root {
    --background: #101726; /* DARK BLUE (You got this right) */
    --foreground: #FAFAFA;
    --card: #1C2541;        /* LIGHTER BLUE (You got this right) */
    --card-foreground: #FAFAFA;
    --popover: #1C2541;     /* <-- 1. FIX (Match the card) */
    --popover-foreground: #FAFAFA;
    --primary: #0D0D0D;
    --primary-foreground: #FAFAFA;
    --secondary: #1C2541;   /* <-- 2. FIX (Match the card) */
    --secondary-foreground: #FAFAFA;
    --muted: #262626;
    --muted-foreground: #A6A6A6;
    --accent: #FFD700;
    --accent-foreground: #0D0D0D;
    --gold: #FFD700;
    --gold-light: #FFE066;
    --gold-dark: #C99000;
    --destructive: #F24C4C;
    --destructive-foreground: #FAFAFA;
    --border: #3A476A;      /* LIGHT BORDER (You got this right) */
    --input: #101726;       /* <-- 3. FIX (Match the background) */
    --ring: #FFD700;
    --radius: 0.5rem;
    --success: #28a745; 
}
}
}

/* --- Base & Responsive Rules --- */
html, body {
    max-width: 100%;
    /* overflow-x: hidden; */
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--foreground);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--gold-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Prevent extra space below images */
}

/* --- Login Page --- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}
.login-container {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-container h1 {
    color: var(--gold);
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.login-container p {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
}
.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--foreground);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.5); /* Softer ring */
}
input[type="file"] {
    padding: 0.5rem;
}
input[type="file"]::file-selector-button {
    background-color: var(--gold);
    color: var(--accent-foreground);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: calc(var(--radius) * 0.8);
    cursor: pointer;
    font-weight: 500;
    margin-right: 0.5rem;
    transition: background-color 0.2s ease;
}
input[type="file"]::file-selector-button:hover {
    background-color: var(--gold-light);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    width: 100%;
    padding: 0.85rem 1.5rem;
    border: 1px solid transparent; /* Base border */
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    line-height: 1.5; /* Ensure text is vertically centered */
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-primary {
    background-color: var(--gold);
    color: var(--accent-foreground);
    border-color: var(--gold);
}
.btn-primary:hover {
    background-color: var(--gold-light);
    border-color: var(--gold-light);
}
.btn-secondary {
    background-color: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background-color: var(--muted);
    border-color: var(--muted);
}
.btn-destructive {
    background-color: var(--destructive);
    color: var(--destructive-foreground);
    border-color: var(--destructive);
}
.btn-destructive:hover {
    opacity: 0.85;
}
/* Specific button adjustments */
.data-table td .btn {
    width: auto;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    display: inline-flex; /* Align icon better */
    align-items: center;
    justify-content: center;
}

/* --- Utility & Text --- */
.error-text {
    color: var(--destructive);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: left; /* Align error messages left */
}
.success-text {
    color: var(--success); /* Use green for success */
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: left; /* Align success messages left */
}
.status-text {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-top: 1rem;
}
.text-center {
    text-align: center;
}
.text-muted {
    color: var(--muted-foreground);
    font-size: 0.85em;
}
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* --- Dashboard Layout --- */
.page-container {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 260px;
    background-color: var(--card);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    padding: 1.5rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Smoother transition */
    z-index: 100;
    display: flex; /* Use flex for vertical layout */
    flex-direction: column;
}
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-shrink: 0; /* Prevent header from shrinking */
}
.sidebar-header h3 {
    color: var(--gold);
    margin: 0;
    font-size: 1.5rem;
}
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto; /* Allow scrolling if links overflow */
    flex-grow: 1; /* Allow nav to take remaining space */
}
.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-weight: 500;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease; /* Add color transition */
}
.sidebar-nav li a:hover {
    background-color: var(--secondary);
    color: var(--foreground);
}
.sidebar-nav li a.active {
    background-color: var(--gold);
    color: var(--accent-foreground);
    font-weight: 600; /* Make active link bolder */
}
.sidebar-nav li a svg {
    width: 20px;
    height: 20px;
    margin-right: 0.85rem; /* Slightly more space */
    stroke-width: 2.5px;
    flex-shrink: 0; /* Prevent icon from shrinking */
}
.sidebar-nav li a.active svg {
    color: var(--accent-foreground);
}

/* --- Main Content --- */
.main-content {
    flex-grow: 1;
    margin-left: 260px; /* Default margin for desktop */
    background-color: var(--background);
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); /* Match sidebar transition */
    overflow-x: hidden;
}
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky; /* Keep header visible */
    top: 0;
    z-index: 90;
}
.header-left {
    display: flex;
    align-items: center;
}
.header-left h2 {
    margin: 0;
    font-size: 1.75rem;
}
/* Style the menu toggle button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    margin-right: 1rem;
    padding: 0.3rem;
    line-height: 1;
}
.menu-toggle svg {
    width: 28px; /* Slightly larger icon */
    height: 28px;
}
/* Style the close menu button */
.close-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0; /* Remove padding if icon has enough space */
    line-height: 1;
    margin-left: auto; /* Push to the right */
}
.close-menu svg {
    width: 28px; /* Match menu icon size */
    height: 28px;
}
.close-menu:hover {
    color: var(--foreground);
}

.content-wrapper {
    padding: 2rem;
}

/* --- Cards --- */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card h3 {
    margin-top: 0;
    margin-bottom: 1rem; /* Add space below heading */
    color: var(--gold);
    border-bottom: 1px solid var(--border); /* Add subtle separator */
    padding-bottom: 0.5rem;
}

/* --- Stats Grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background-color: var(--secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.stat-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--muted-foreground);
    font-weight: 500;
    font-size: 1rem;
}
.stat-card p {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.1; /* Adjust line height */
}

/* --- Table Responsiveness --- */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* Enables horizontal scroll ONLY for this div */
    -webkit-overflow-scrolling: touch; /* Smoother scrolling on iOS */
    margin-top: 1.5rem; /* Add space above the table container */
    border: 1px solid var(--border); /* Optional: Add border around scroll area */
    border-radius: var(--radius); /* Match card radius */
}
.data-table {
    width: 100%; /* Table takes full width of its container */
    border-collapse: collapse;
    min-width: 700px; /* Force scroll on screens smaller than 700px */
}
.data-table th,
.data-table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
    white-space: nowrap; /* Prevent text wrapping */
}
.data-table th {
    background-color: var(--secondary);
    color: var(--muted-foreground);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    position: sticky; /* Keep header visible when scrolling horizontally */
    top: 0; /* Required for sticky */
    z-index: 10;
}
/* Style the first column header (Date & Time) */
.data-table th:first-child {
     position: sticky; /* Keep first column visible */
     left: 0;
     z-index: 11; /* Above other headers */
     background-color: var(--secondary); /* Ensure background covers */
}
/* Style the first column cells */
.data-table td:first-child {
     position: sticky; /* Keep first column visible */
     left: 0;
     background-color: var(--card); /* Match card background */
     border-right: 1px solid var(--border); /* Add separator line */
}
.data-table tr:last-child td {
    border-bottom: none; /* Remove bottom border on last row */
}
.data-table td strong {
    color: var(--foreground); /* Make names stand out */
}

/* --- Profile Passport Image --- */
.profile-passport {
    width: 48px; /* Header size */
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--gold);
    background-color: var(--secondary);
    flex-shrink: 0; /* Prevent shrinking */
}
.profile-passport img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area without distortion */
}
/* Profile page specific */
.profile-upload-label {
    display: inline-block; /* Allow hover cursor */
    cursor: pointer;
}
.profile-upload-label .profile-passport.large {
    width: 100px; /* Slightly larger */
    height: 100px;
    border-radius: 50%;
    border-width: 3px;
    margin-bottom: 1rem; /* Space below photo */
}

/* --- Service List (Replaces Gallery) --- */
#service-list-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem; /* Match stats-grid gap */
}

.service-card-admin {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card-admin:hover {
    transform: translateY(-5px); /* Match stat card hover */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* Match stat card hover */
}

.service-card-admin img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

/* This is the delete button */
.service-card-admin .delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--destructive);
    color: var(--destructive-foreground);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0; /* Hide by default */
    transition: opacity 0.2s, background-color 0.2s;
    z-index: 5;
}

.service-card-admin:hover .delete-btn {
    opacity: 1; /* Show on card hover */
}

.service-card-admin .delete-btn:hover {
    opacity: 0.85; /* Use theme's hover style */
}

.service-card-content {
    padding: 1rem; /* Use consistent padding */
    flex-grow: 1; /* Allows footer to stick to bottom */
    display: flex;
    flex-direction: column;
}

.service-card-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold); /* Use theme gold for heading */
}

.service-card-content .service-desc {
    font-size: 0.9rem;
    color: var(--muted-foreground); /* Use theme muted text */
    margin-bottom: 1rem;
    flex-grow: 1; /* Pushes meta to the bottom */
}

.service-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border); /* Use theme border */
    padding-top: 1rem;
    font-size: 0.9rem;
}

.service-price {
    font-weight: 600;
    color: var(--gold); /* Use theme gold for price */
    font-size: 1rem;
}

.service-duration {
    color: var(--muted-foreground);
    background: var(--secondary); /* Use theme secondary bg */
    padding: 3px 8px;
    border-radius: calc(var(--radius) * 0.5); /* Use theme radius */
}
/* --- End of Service List --- */


/* --- Responsive (Mobile) --- */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%); /* Hides sidebar */
        box-shadow: none; /* Remove shadow when hidden */
    }
    .sidebar.active {
        transform: translateX(0); /* Shows sidebar */
        box-shadow: 5px 0 15px rgba(0,0,0,0.3); /* Add shadow when active */
    }
    .main-content {
        margin-left: 0; /* Full width when sidebar is hidden */
    }
    .menu-toggle,
    .close-menu {
        display: block; /* Show menu/close buttons */
    }
    .main-header {
        padding: 1rem 1.5rem;
    }
    .content-wrapper {
        padding: 1.5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr; /* Stack stat cards */
    }
}
@media (max-width: 480px) {
    .header-left h2 {
        font-size: 1.35rem; /* Adjust title size */
    }
    .stat-card p {
        font-size: 2.2rem; /* Adjust stat size */
    }
    /* Reduce padding on smaller screens for table */
    .data-table th,
    .data-table td {
        padding: 0.7rem 0.8rem;
    }
    .content-wrapper {
        padding: 1rem; /* Reduce padding overall */
    }
    .card {
        padding: 1rem; /* Reduce card padding */
    }
    /* Adjust sticky column padding on small screens if needed */
    .data-table th:first-child,
    .data-table td:first-child {
       /* Optional: Adjust padding if text overlaps */
       /* padding-right: 0.5rem; */
    }
}

/* --- Fix for Signup Button Hover --- */
.login-container #signup-form .btn-secondary:hover,
.login-container #signup-form .btn-secondary:focus {
    background-color: var(--gold-light);
    color: var(--accent-foreground);
    border-color: var(--gold-light);
}
/* --- Password Toggle Button --- */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0;
}

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

/* --- Forgot Password Link --- */
.forgot-password-link {
  display: block;
  text-align: right;
  font-size: 0.9em;
  margin-top: 10px;
  color: #f0b90b; /* Using your bright yellow button color */
  text-decoration: underline; /* Make it obvious it's a link */
}

.forgot-password-link:hover {
  color: #ffffff; /* Make it white when you hover */
}


/* --- Stat Card Hover Effect (CLEANED UP) --- */
/* 1. Add smooth transitions for color */
/* --- Stat Card Hover Effect (NEW: Yellow background) --- */

/* 1. Add smooth transitions for color */
.stat-card {
    cursor: pointer;
    /* Added background-color to the transition */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

/* 2. Add transition for ALL text inside the card */
.stat-card h4, .stat-card p {
    transition: color 0.2s ease;
}

/* 3. Define the new hover state (yellow background) */
.stat-card:hover {
    transform: translateY(-5px); /* The "lift" effect */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* The shadow */
    background-color: var(--gold); /* NEW: Makes the background yellow */
    border-color: var(--gold-dark); /* NEW: Darker border for contrast */
}

/* 4. Define the new text hover state (dark text) */
.stat-card:hover h4 {
    color: var(--accent-foreground); /* NEW: Makes title dark */
}
.stat-card:hover p {
    color: var(--accent-foreground); /* NEW: Makes number dark */
}
/* --- Copyright Footer Styling --- */
.copyright-footer {
    /* Set basic alignment and style */
    text-align: center;
    padding: 10px 0;
    font-size: 12px;
    color: #888; 
    
    /* Ensure it has enough width for centering */
    width: 100%; 
    
    /* Remove background/shadow for simple pages like register */
    background-color: transparent; 
    box-shadow: none; 
}

/* This targets the footer specifically on the login/register pages */
.login-page .copyright-footer {
    /* KEY FIX: Use absolute position to anchor it to the body/container */
    position: absolute; 
    
    /* This pushes it down, relative to the container, not the viewport */
    bottom: 10px; 
}

/* For your dashboard, you might want it to flow normally (no position: fixed/absolute) */
/* If the above code causes issues on the dashboard, you may need to add: */
.dashboard-page .copyright-footer {
    position: relative; 
    margin-top: 20px;
    padding-bottom: 20px;
    /* This allows it to be seen only when scrolling down */
}

.copyright-footer p {
    margin: 0;
}