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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --background: #f1f5f9;
    --sidebar: #0f172a;
    --sidebar-hover: #1e293b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --surface: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
}

h1, h2, h3, h4, .logo { font-family: 'Outfit', sans-serif; font-weight: 600; }

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

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar);
    color: white;
    height: 100vh;
    position: fixed;
    left: 0; top: 0;
    display: flex; flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.sidebar-logo {
    font-size: 1.5rem; font-weight: 700; margin-bottom: 3rem;
    display: flex; align-items: center; gap: 0.75rem;
    color: white; text-decoration: none;
}

.sidebar-logo span span {
    background: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.875rem 1rem; color: var(--text-light);
    text-decoration: none; border-radius: 0.75rem;
    font-weight: 500; transition: all 0.2s;
}

.nav-item:hover { background: var(--sidebar-hover); color: white; }
.nav-item.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3); }

.sidebar-footer { margin-top: auto; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.user-profile { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.5rem; }
.avatar { width: 2.5rem; height: 2.5rem; background: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; }

.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    padding: 2rem 3rem; width: calc(100% - var(--sidebar-width));
}

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }

.card {
    background: white; border-radius: 1.25rem; padding: 2rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.card-title { font-size: 1.25rem; margin-bottom: 1.5rem; color: var(--text-main); }

.stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
.stat-widget { background: white; padding: 1.5rem; border-radius: 1.25rem; border: 1px solid var(--border); display: flex; flex-direction: column; }
.stat-widget-label { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.5rem; }
.stat-widget-value { font-size: 1.75rem; font-weight: 700; color: var(--text-main); }

.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; padding: 1rem; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; border-bottom: 2px solid var(--background); }
td { padding: 1.25rem 1rem; border-bottom: 1px solid var(--background); vertical-align: middle; }
tr:hover td { background: #f8fafc; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.25rem; border-radius: 0.75rem; font-weight: 600; transition: all 0.2s; cursor: pointer; border: none; text-decoration: none; font-size: 0.875rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-secondary { background: white; border: 1px solid var(--border); color: var(--text-main); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--background); color: var(--text-main); }

.calendar-widget { background: white; border-radius: 1.5rem; overflow: hidden; border: 1px solid var(--border); }
.calendar-grid-header { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8fafc; border-bottom: 1px solid var(--border); }
.calendar-day-label { padding: 1rem; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-cell { min-height: 120px; padding: 0.75rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: white; }
.calendar-cell.today { background: rgba(99, 102, 241, 0.02); }
.day-tag { font-size: 0.875rem; font-weight: 600; color: var(--text-light); margin-bottom: 0.5rem; }
.calendar-cell.today .day-tag { color: var(--primary); background: rgba(99, 102, 241, 0.1); width: 1.75rem; height: 1.75rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.booking-strip { background: var(--primary); color: white; padding: 0.4rem 0.75rem; font-size: 0.7rem; font-weight: 600; border-radius: 0.4rem; margin: 0.2rem -0.5rem; position: relative; box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Modal System */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1.5rem;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: 1.5rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    border-top: 1px solid var(--border);
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.alert { padding: 1rem; border-radius: 0.75rem; margin-bottom: 1.5rem; font-weight: 500; font-size: 0.875rem; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); font-size: 0.875rem; }

/* Page Login */
.login-page {
    background-color: #0f172a;
    background-image: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-container { width: 100%; max-width: 440px; padding: 1.5rem; }
.login-box {
    background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    padding: 3.5rem 3rem; border-radius: 2rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2); text-align: center;
}
.login-box h1 { font-size: 2.25rem; margin-bottom: 0.5rem; color: var(--sidebar); letter-spacing: -0.05em; }
.login-box h1 span { background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2.5rem; }
.demo-info { margin-top: 2rem; padding: 1rem; background: rgba(99, 102, 241, 0.05); border-radius: 1rem; font-size: 0.8125rem; color: var(--primary-dark); }
.login-form .form-group { text-align: left; }

@media (max-width: 1024px) {
    .sidebar { width: 80px; padding: 2rem 1rem; }
    .sidebar-logo span, .nav-item span, .user-profile span { display: none; }
    .main-content { margin-left: 80px; width: calc(100% - 80px); padding: 2rem; }
}