:root {
    --sidebar-width: 250px;
    --sidebar-bg: #1e293b;
    --sidebar-text: #94a3b8;
    --sidebar-active: #3b82f6;
    --primary: #3b82f6;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: #f1f5f9;
    margin: 0;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

.sidebar-logo:hover {
    opacity: 0.9;
}

.sidebar-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.logo-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    letter-spacing: 1px;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--sidebar-text);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.sidebar-nav li a:hover,
.sidebar-nav li.active a {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
    border-right: 3px solid var(--sidebar-active);
}

.sidebar-nav li a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Room Grid */
.room-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.room-card {
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.room-card:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.room-card.available { background: #dcfce7; border-color: #22c55e; }
.room-card.occupied { background: #dbeafe; border-color: #3b82f6; }
.room-card.reserved { background: #fef3c7; border-color: #f59e0b; }
.room-card.cleaning { background: #e0e7ff; border-color: #6366f1; }
.room-card.maintenance { background: #fee2e2; border-color: #ef4444; }

.room-number {
    font-size: 1.3rem;
    font-weight: 700;
}

.room-type {
    font-size: 0.8rem;
    color: #64748b;
}

/* Calendar */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.calendar-day {
    background: #fff;
    min-height: 100px;
    padding: 4px;
    position: relative;
}

.calendar-day.other-month {
    background: #f8fafc;
    color: #94a3b8;
}

.calendar-day.today {
    background: #eff6ff;
}

.calendar-day .day-number {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 6px;
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-event {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 3px;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

/* Planning Grid */
.planning-table {
    overflow-x: auto;
}

.planning-table table {
    min-width: 100%;
    font-size: 0.8rem;
}

.planning-table th,
.planning-table td {
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    text-align: center;
    white-space: nowrap;
    min-width: 80px;
}

.planning-table th {
    background: #f1f5f9;
    position: sticky;
    top: 0;
    z-index: 10;
}

.planning-cell {
    padding: 4px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

/* Table */
.table-hover tbody tr { transition: background 0.15s; }
.table th { font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }

/* Modal */
.modal-header { background: var(--primary); color: #fff; }
.modal-header .btn-close { filter: brightness(0) invert(1); }

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .room-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    .stat-value { font-size: 1.4rem; }
    .calendar-day { min-height: 60px; }
    .calendar-event { font-size: 0.65rem; }
    .sidebar-logo-img {
        width: 40px;
        height: 40px;
    }
    .logo-title {
        font-size: 1.2rem;
    }
}

/* Utility */
.cursor-pointer { cursor: pointer; }
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}
