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

:root {
    /* Color Palette */
    --bg-body: #f1f5f9; /* Soft background */
    --bg-dark: #ffffff; /* Panels */
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    
    --primary: #dc2626; /* Vibrant Professional Red */
    --primary-hover: #b91c1c;
    
    --status-free: #059669; /* Professional Green */
    --status-free-bg: rgba(5, 150, 105, 0.1);
    
    --status-booked: #dc2626; /* Vibrant Red */
    --status-booked-bg: rgba(220, 38, 38, 0.1);
    
    --border: #e2e8f0;
    
    /* Effects */
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --glass-blur: blur(0px);
    --transition: all 0.3s ease;
}

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

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Dashboard Sidebar Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.dashboard-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    z-index: 10;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-link:hover {
    background: rgba(0,0,0,0.03);
    color: var(--text-main);
}

.sidebar-link.active {
    background: rgba(220, 38, 38, 0.05); /* Primary tint */
    color: var(--primary);
}

.sidebar-footer {
    margin-top: auto;
}

/* Typography & Utilities */
h1, h2, h3, h4 { font-weight: 600; }
.hidden { display: none !important; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* Material Icons Alignment */
.material-symbols-rounded {
    vertical-align: middle;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}
.btn-primary {
    background-color: var(--primary);
    color: white;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
}
.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.btn-icon {
    padding: 8px;
    background: transparent;
    border: none;
    color: var(--text-main);
    border-radius: 50%;
}
.btn-icon:hover {
    background: rgba(0, 0, 0, 0.05);
}
.btn-block {
    width: 100%;
}

/* Forms */
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}
.input-group input, .input-group textarea, .input-group select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 15px;
    outline: none;
    transition: var(--transition);
}
.input-group input:focus, .input-group textarea:focus, .input-group select:focus {
    border-color: var(--primary);
}
.facilities-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.facilities-checkboxes label {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.03);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    margin-bottom: 0;
    color: var(--text-main);
}

/* View Container */
.view {
    min-height: 100vh;
    animation: fadeIn 0.4s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login View */
#login-view {
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-panel {
    width: 100%;
    max-width: 400px;
    padding: 40px;
}
.logo-container {
    text-align: center;
    margin-bottom: 8px;
}
.logo-icon {
    font-size: 48px;
    color: var(--primary);
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.form-hint {
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    height: 100vh;
    background: var(--bg-body);
}

.dashboard-sidebar {
    width: 300px;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 32px;
    display: flex;
    flex-direction: column;
    z-index: 20;
}

.dashboard-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
}

/* App Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    backdrop-filter: var(--glass-blur);
    position: sticky;
    top: 0;
    z-index: 10;
}
.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Dashboard Content */
.dashboard-content {
    flex: 1;
    padding: 40px;
    overflow-y: auto;
    background-color: var(--bg-body);
}

.admin-content {
    padding: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    margin-bottom: 32px;
}

/* Rooms Grid */
.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}
.room-card {
    padding: 24px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.room-card.status-free {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    border-color: #dcfce7;
}
.room-card.status-booked {
    background: linear-gradient(145deg, #ffffff 0%, #fef2f2 100%);
    border-color: #fee2e2;
}
.room-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.room-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}
.room-title {
    font-size: 18px;
    margin-bottom: 4px;
}
.room-floor {
    font-size: 13px;
    color: var(--text-muted);
}
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}
.status-badge::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}
.status-free .status-badge {
    background: var(--status-free-bg);
    color: var(--status-free);
}
.status-free .status-badge::before { background: var(--status-free); box-shadow: 0 0 8px var(--status-free); }

.status-booked .status-badge {
    background: var(--status-booked-bg);
    color: var(--status-booked);
}
.status-booked .status-badge::before { background: var(--status-booked); box-shadow: 0 0 8px var(--status-booked); }

.room-facilities {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    color: var(--text-muted);
}

/* Tablet View */
.floating-back {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 20;
    background: rgba(255,255,255,0.9) !important;
    color: #000;
}
/* Tablet Zoapi Redesign */
.tablet-layout {
    background-color: #111111 !important; /* Dark theme */
    color: #ffffff;
    height: 100vh;
    display: flex;
    overflow: hidden;
    width: 100%;
}
.tablet-container {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    background: #111;
}
.tablet-left {
    width: 380px;
    border-right: 1px solid #333;
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}
.tablet-right {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tablet-logo {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 60px;
}

.tablet-today-title {
    font-size: 24px;
    margin-bottom: 24px;
    font-weight: 500;
    color: #fff;
}

.tablet-no-meetings {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 20px;
}

.tablet-btn-calendar {
    margin-top: auto;
    background: linear-gradient(90deg, #d32f2f, #e53935);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
}

.tablet-status-card {
    border-radius: 24px;
    padding: 40px;
    color: #fff;
    margin-bottom: 40px;
    transition: background-color 0.5s ease;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.tablet-status-card.free { background-color: #4caf50; }
.tablet-status-card.booked { background-color: #d32f2f; }

.tablet-room-title {
    font-size: 40px;
    font-weight: 300;
    margin-bottom: 16px;
}

.tablet-icons-row {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    margin-bottom: auto;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 10px;
}
.tablet-icons-row .material-symbols-rounded { font-size: 18px; }

.tablet-availability-text {
    font-size: 28px;
    font-weight: 500;
}

.tablet-reserve-row {
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: auto;
}

.tablet-reserve-label {
    font-size: 18px;
    color: #fff;
}

.tablet-reserve-btn {
    background: transparent;
    border: none;
    color: #4caf50;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
}
.booked .tablet-reserve-btn.quick-btn { color: #888; pointer-events: none; }
.booked .tablet-reserve-btn.custom-btn { color: #fff; pointer-events: auto; }

.tablet-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.tablet-upcoming {
    color: #aaa;
    font-size: 20px;
}
.tablet-time {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 4px;
    color: #fff;
}
.tablet-date {
    font-size: 18px;
    color: #aaa;
}

/* Modals */
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}
.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 32px;
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

/* Admin Layout */
.admin-content {
    display: flex;
    gap: 32px;
}
.admin-sidebar {
    width: 250px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-tab {
    text-align: left;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
}
.admin-tab:hover { background: rgba(0,0,0,0.05); }
.admin-tab.active { background: rgba(0,0,0,0.08); color: var(--text-main); }
.admin-main { flex: 1; }

.admin-list { margin-top: 24px; }
.admin-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
}
.admin-list-item-actions {
    display: flex;
    gap: 8px;
}

/* Responsiveness */
@media (max-width: 1024px) {
    .tablet-container {
        flex-direction: column;
        overflow-y: auto;
        height: 100vh;
    }
    .tablet-left {
        width: 100% !important;
        border-right: none !important;
        border-bottom: 1px solid #333;
        padding: 30px !important;
        min-height: auto !important;
        height: auto !important;
        flex: none !important;
    }
    .tablet-right {
        padding: 30px !important;
        width: 100% !important;
        height: auto !important;
        flex: 1 !important;
    }
    .tablet-status-card {
        padding: 24px !important;
        min-height: auto !important;
        margin-bottom: 24px !important;
    }
    .tablet-room-title {
        font-size: 28px !important;
    }
    .tablet-reserve-row {
        flex-direction: column !important;
        gap: 16px !important;
        align-items: stretch !important;
        text-align: center;
    }
    .tablet-reserve-btn {
        padding: 12px !important;
        border: 1px solid #444 !important;
        border-radius: 8px;
    }
}

@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
        height: auto;
    }
    .dashboard-sidebar {
        width: 100% !important;
        height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid var(--border);
        padding: 20px !important;
        position: relative;
    }
    .dashboard-content {
        padding: 20px !important;
        height: auto;
    }
    .rooms-grid {
        grid-template-columns: 1fr !important;
    }
    .tablet-logo {
        margin-bottom: 24px !important;
    }
}
