/* ===========================================
   VILLA ANDHITA DASHBOARD - MAIN STYLESHEET
   Share Tech Font | Dark/Light Mode Support
   =========================================== */

/* ===========================================
   1. IMPORTS & VARIABLES
   =========================================== */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech&display=swap');

:root {
    /* Brand Colors */
    --primary: #3b82f6;
    --secondary: #1e3a8a;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --purple: #8b5cf6;
    --indigo: #6366f1;

    /* Light Mode */
    --bg-color: #f3f4f6;
    --card-color: #ffffff;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;

    /* Sizes */
    --sidebar-width: 260px;
    --header-height: 70px;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ===========================================
   2. RESET & BASE
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Share Tech', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 20px 20px;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===========================================
   3. TYPOGRAPHY
   =========================================== */
h1 {
    font-size: 24px;
    font-weight: 700;
}

h2 {
    font-size: 20px;
    font-weight: 600;
}

h3 {
    font-size: 16px;
    font-weight: 600;
}

h4 {
    font-size: 14px;
    font-weight: 600;
}

.text-xs {
    font-size: 11px;
}

.text-sm {
    font-size: 13px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 24px;
}

.text-2xl {
    font-size: 28px;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
    font-weight: 600;
}

.text-danger {
    color: var(--danger);
    font-weight: 600;
}

.text-warning {
    color: var(--warning);
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wide {
    letter-spacing: 1px;
}

.font-bold {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* ===========================================
   4. LAYOUT
   =========================================== */
.main-layout {
    display: flex;
    min-height: calc(100vh - var(--header-height));
    padding-top: var(--header-height);
}

.content {
    flex: 1;
    padding: 24px;
    margin-left: var(--sidebar-width);
    max-width: 1400px;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

.flex-1 {
    flex: 1;
}

.flex-wrap {
    flex-wrap: wrap;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Spacing */
.m-0 {
    margin: 0;
}

.mt-2 {
    margin-top: 8px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.py-2 {
    padding-top: 8px;
    padding-bottom: 8px;
}

/* ===========================================
   5. HEADER
   =========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--card-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    backdrop-filter: blur(8px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--indigo));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.header-logo .material-icons-round {
    font-size: 28px;
}

.header-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.header-title h1 {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    line-height: 1.2;
}

.header-title p {
    font-size: 11px;
    color: var(--text-muted);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-color);
    border-radius: 20px;
}

.header-user img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===========================================
   6. SIDEBAR
   =========================================== */
.sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--card-color);
    border-right: 1px solid var(--border-color);
    padding: 16px 12px;
    overflow-y: auto;
    z-index: 90;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item .material-icons-round {
    font-size: 20px;
}

/* ===========================================
   7. CARDS
   =========================================== */
.card {
    background: var(--card-color);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.card-bordered {
    border: 1px solid var(--border-color);
}

.card-primary {
    border-left: 4px solid var(--primary);
}

.card-success {
    border-left: 4px solid var(--success);
}

.card-danger {
    border-left: 4px solid var(--danger);
}

.card-warning {
    border-left: 4px solid var(--warning);
}

.card-purple {
    border-left: 4px solid var(--purple);
}

.card-indigo {
    border-left: 4px solid var(--indigo);
}

.card-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-value {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.card-icon-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary);
}

.card-icon-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.card-icon-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.card-icon-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Stat Card */
.stat-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.stat-card .card-icon {
    opacity: 0.6;
}

/* ===========================================
   8. BUTTONS
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

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

.btn-primary:hover {
    background: #2563eb;
}

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

.btn-success:hover {
    background: #059669;
}

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

.btn-danger:hover {
    background: #dc2626;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-color);
}

.btn-outline:hover {
    background: var(--bg-color);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

/* ===========================================
   9. FORMS
   =========================================== */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: #fafafa;
    transition: all 0.2s;
    color: var(--text-color);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ===========================================
   10. TABLES
   =========================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: var(--card-color);
}

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

th {
    background: #f9fafb;
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #fafafa;
}

/* ===========================================
   11. BADGES
   =========================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

/* ===========================================
   12. ROOM STATUS CARDS
   =========================================== */
.room-card {
    background: var(--card-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}

.room-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.room-card-header {
    height: 4px;
}

.room-card-header.occupied {
    background: var(--primary);
}

.room-card-header.available {
    background: var(--success);
}

.room-card-header.maintenance {
    background: var(--danger);
}

.room-card-header.cleaning {
    background: var(--warning);
}

.room-card-body {
    padding: 16px;
}

.room-number {
    font-size: 20px;
    font-weight: 700;
}

.room-type {
    font-size: 12px;
    color: var(--text-muted);
}

.room-guest {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.room-guest-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

/* ===========================================
   13. LOADING & EMPTY STATES
   =========================================== */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading .material-icons-round {
    font-size: 36px;
    margin-bottom: 12px;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .material-icons-round {
    font-size: 64px;
    opacity: 0.3;
    margin-bottom: 16px;
}

/* ===========================================
   14. TOAST NOTIFICATIONS
   =========================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

.toast-success {
    background: var(--success);
}

.toast-error {
    background: var(--danger);
}

.toast-warning {
    background: var(--warning);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===========================================
   15. BOTTOM NAV (Mobile Only)
   =========================================== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-color);
    border-top: 1px solid var(--border-color);
    padding: 8px 16px 24px;
    z-index: 100;
}

.bottom-nav .nav-item {
    flex-direction: column;
    padding: 8px 4px;
    gap: 2px;
    font-size: 10px;
    flex: 1;
    text-align: center;
}

/* ===========================================
   16. DARK MODE
   =========================================== */
body.dark {
    --bg-color: #0f172a;
    --card-color: #1e293b;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --border-color: #334155;

    background-image: radial-gradient(#334155 1px, transparent 1px);
}

body.dark .form-input,
body.dark .form-select,
body.dark .form-textarea {
    background: #0f172a;
    color: var(--text-color);
}

body.dark th,
body.dark .room-guest {
    background: #0f172a;
}

body.dark tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

body.dark .header-title h1 {
    color: #93c5fd;
}

/* ===========================================
   17. RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    .content {
        margin-left: 0;
        padding: 16px;
        padding-bottom: 100px;
    }

    .bottom-nav {
        display: flex;
        justify-content: space-around;
    }

    .header-title h1 {
        font-size: 14px;
    }

    .header-title p {
        display: none;
    }

    .header-user span {
        display: none;
    }

    .cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card {
        padding: 16px;
    }

    .card-value {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 18px;
    }
}

/* ===========================================
   18. PAGE SPECIFIC
   =========================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    font-size: 22px;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar .form-select,
.filter-bar .form-input {
    width: auto;
    min-width: 140px;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 280px;
}
