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

:root {
    --primary: #10b981;
    --primary-dark: #065f46;
    --secondary: #6366f1;
    --bg-app: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Pages (Login/Register) */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.auth-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeIn 0.5s ease-out;
}

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

.auth-card h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-dark);
    text-align: center;
}

.auth-card p {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: var(--white);
    transition: all 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.9rem;
}

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

/* Main Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 288px;
    min-width: 288px;
    flex-shrink: 0;
    background: var(--white);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.sidebar-logo {
    margin-bottom: 24px;
    padding-left: 6px;
}

.sidebar h2 {
    font-size: 1.5rem;
    color: var(--primary-dark);
    margin-bottom: 0;
}

.sidebar .version {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
    display: block;
    margin-top: -5px;
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-item {
    margin-bottom: 6px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    word-spacing: -0.05em;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-dark);
}

.nav-link i {
    margin-right: 10px;
    font-size: 1.15rem;
}

.nav-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 10px 6px;
}

.main-content {
    flex-grow: 1;
    padding: 40px;
    max-height: 100vh;
    overflow-y: auto;
}

/* Header */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

/* Dashboard Widgets */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Client Table */
/* Table responsiveness globally */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #f8fafc;
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

td {
    padding: 15px 20px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

tr:hover {
    background: #fcfcfc;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active { background: #dcfce7; color: #166534; }
.status-inactive { background: #fee2e2; color: #991b1b; }

/* Mobile Menu Toggle Button (Desktop hidden) */
.menu-toggle-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 6px;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.menu-toggle-btn:hover {
    color: var(--primary);
}

.menu-toggle-btn:active {
    transform: scale(0.9);
}

/* Mobile Menu Backdrop */
.mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu-header {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        padding: 15px 20px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        position: sticky;
        top: 0;
        z-index: 9999;
        background: var(--white);
    }
    .sidebar-logo {
        margin-bottom: 0;
    }
    .sidebar h2 { margin-bottom: 0; font-size: 1.2rem; }
    .sidebar .version { font-size: 0.75rem; margin-top: -2px; }
    
    .menu-toggle-btn {
        display: flex;
    }

    /* Mobile Drawer Menu */
    .nav-links {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85%;
        background: var(--white);
        z-index: 9999;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        flex-direction: column;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 24px 20px;
        overflow-y: auto;
    }
    
    .nav-links.menu-open {
        transform: translateX(0) !important;
    }

    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 1px solid #f1f5f9;
    }

    .mobile-menu-header h3 {
        font-size: 1.2rem;
        color: var(--primary-dark);
        font-weight: 700;
    }

    .menu-close-btn {
        background: none;
        border: none;
        color: var(--text-muted);
        font-size: 1.8rem;
        cursor: pointer;
        line-height: 1;
        padding: 4px;
        transition: color 0.2s;
    }

    .menu-close-btn:hover {
        color: #ef4444;
    }

    .main-content {
        padding: 20px;
        max-height: none;
        overflow-y: visible;
    }

    /* Polishing the content header on mobile */
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .content-header .user-profile {
        align-self: flex-end;
        margin-top: -5px;
    }

    .btn-free-slots {
        width: 100%;
        justify-content: center;
    }
}

/* Status Select in Table */
.status-select {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    outline: none;
    appearance: none;
    text-align: center;
    transition: all 0.3s ease;
}
.status-select.active { background: #dcfce7; color: #166534; }
.status-select.inactive { background: #fee2e2; color: #991b1b; }
/* MODALS */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: white;
    padding: 30px;
    width: 350px;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-dark);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Privacy Masking Mode */
.session-value {
    display: inline-block;
    transition: filter 0.3s ease, background-color 0.3s ease;
}
.session-value.blurred {
    filter: blur(6px);
    user-select: none;
    pointer-events: none;
}

/* Red Premium Button for Free Slots */
.btn-free-slots {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 30px;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-free-slots:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-free-slots:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.2);
}

.btn-free-slots i {
    font-size: 0.95rem;
}

/* Free Slots Glassmorphic Modal */
.free-slots-modal-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.25s ease-out;
}

.free-slots-modal-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 95%;
    max-width: 650px;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

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

.free-slots-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05) 0%, rgba(220, 38, 36, 0.02) 100%);
}

.free-slots-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.free-slots-header h2 i {
    color: #ef4444;
}

.free-slots-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.free-slots-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #ef4444;
}

.free-slots-body {
    padding: 20px 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.free-slots-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.4;
}

.free-slots-day-section {
    margin-bottom: 22px;
}

.free-slots-day-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 10px;
    border-left: 3px solid #ef4444;
    padding-left: 10px;
    text-transform: capitalize;
}

.free-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.free-slot-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid transparent;
}

.free-slot-badge.full-free {
    background: rgba(16, 185, 129, 0.08);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.15);
}

.free-slot-badge.full-free:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
}

.free-slot-badge.alt-free {
    background: rgba(99, 102, 241, 0.08);
    color: #3730a3;
    border-color: rgba(99, 102, 241, 0.15);
}

.free-slot-badge.alt-free:hover {
    background: #6366f1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.2);
}

.free-slot-badge .slot-hour {
    font-size: 1rem;
    font-weight: 700;
}

.free-slot-badge .slot-type {
    font-size: 0.7rem;
    font-weight: 500;
    margin-top: 3px;
    opacity: 0.85;
    text-align: center;
}

.free-slots-empty {
    text-align: center;
    padding: 30px;
    color: #64748b;
    font-size: 0.95rem;
}

.free-slots-empty i {
    font-size: 2rem;
    color: #94a3b8;
    margin-bottom: 10px;
    display: block;
}

