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

:root {
    --bg-main: #f3f4f9;
    --bg-card: #ffffff;
    --bg-sidebar: #5e4b8c;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --primary: #5e4b8c;
    --primary-hover: #4b3a72;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --font-sans: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(94, 75, 140, 0.04), 0 4px 6px -4px rgba(94, 75, 140, 0.02);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

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

/* Base Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #5e4b8c; /* Solid purple shade matching reference image */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 280 180" fill="none"><path d="M-20 180C10 130 50 140 80 100C110 60 90 20 120 0C90 30 70 80 30 110C-10 140 -20 180 -20 180Z" fill="%23ffffff" fill-opacity="0.05"/><path d="M280 180C250 140 220 150 190 110C160 70 180 30 150 10C170 40 190 80 230 110C270 140 280 180 280 180Z" fill="%23ffffff" fill-opacity="0.04"/></svg>');
    background-position: bottom;
    background-repeat: no-repeat;
    background-size: contain;
    border-right: none;
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    flex-shrink: 0;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
}

.sidebar-brand {
    margin-bottom: 2.5rem;
    padding: 0 0.5rem;
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
}

.brand-logo-container i {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.brand-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 0.5rem;
    line-height: 1.3;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-item a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-item a i {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.sidebar-item a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item a:hover i {
    transform: scale(1.1);
}

/* Curve notches for active item */
.sidebar-item.active a {
    color: var(--primary) !important;
    background-color: var(--bg-main) !important;
    font-weight: 600;
    border-radius: 30px 0 0 30px;
    margin-right: -1.5rem;
    padding-right: 2rem;
    position: relative;
    box-shadow: -4px 4px 10px rgba(0, 0, 0, 0.03);
}

.sidebar-item.active a i {
    color: var(--primary);
}

.sidebar-item.active a::before,
.sidebar-item.active a::after {
    content: '';
    position: absolute;
    right: 0;
    width: 20px;
    height: 20px;
    background-color: transparent;
    pointer-events: none;
}

.sidebar-item.active a::before {
    top: -20px;
    border-bottom-right-radius: 20px;
    box-shadow: 5px 5px 0 5px var(--bg-main);
}

.sidebar-item.active a::after {
    bottom: -20px;
    border-top-right-radius: 20px;
    box-shadow: 5px -5px 0 5px var(--bg-main);
}

.sidebar-user {
    margin-top: auto;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #ff8b94;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.logout-btn:hover {
    opacity: 0.8;
}

/* Main Content Area */
.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Top Navbar layout matching reference */
.top-navbar {
    height: 75px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

.top-navbar-greeting {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.greeting-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.user-fullname {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.top-navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar-badge-item {
    display: flex;
    align-items: center;
}

.navbar-notification-btn {
    position: relative;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fafbfc;
    border: 1px solid var(--border-color);
    transition: background-color 0.2s, color 0.2s;
}

.navbar-notification-btn:hover {
    background-color: #f3f4f6;
    color: var(--primary);
}

.notification-badge-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
    border: 2px solid #ffffff;
}

.navbar-avatar-wrapper {
    display: flex;
    align-items: center;
}

.user-avatar-circle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: rgba(94, 75, 140, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    border: 2px solid var(--primary);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.content-container {
    padding: 2rem;
    flex-grow: 1;
    overflow-y: auto;
}

/* Cards & Glassmorphism */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

/* Dashboard Metrics Grid - Icon on left, stacked text on right */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.metrics-grid .metric-card:nth-child(1) { border-left: 4px solid #ff7782; }
.metrics-grid .metric-card:nth-child(2) { border-left: 4px solid #5e4b8c; }
.metrics-grid .metric-card:nth-child(3) { border-left: 4px solid #ffbb55; }
.metrics-grid .metric-card:nth-child(4) { border-left: 4px solid #41f1b6; }

.metric-icon-wrapper {
    flex-shrink: 0;
}

.metric-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: transform 0.2s;
}

.metrics-grid .metric-card:nth-child(1) .metric-icon { background-color: rgba(255, 119, 130, 0.12); color: #ff7782 !important; }
.metrics-grid .metric-card:nth-child(2) .metric-icon { background-color: rgba(94, 75, 140, 0.12); color: #5e4b8c !important; }
.metrics-grid .metric-card:nth-child(3) .metric-icon { background-color: rgba(255, 187, 85, 0.12); color: #ffbb55 !important; }
.metrics-grid .metric-card:nth-child(4) .metric-icon { background-color: rgba(65, 241, 182, 0.12); color: #41f1b6 !important; }

.metric-card:hover .metric-icon {
    transform: scale(1.1);
}

.metric-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.metric-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

/* Spaces Status Grid on Dashboard */
.spaces-status-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.space-status-item {
    text-align: center;
    padding: 1.25rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background-color: #fafbfc;
    transition: transform 0.2s, box-shadow 0.2s;
}

.space-status-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.status-value {
    font-weight: 800;
    font-size: 1.8rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.status-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.space-status-item.status-libre .status-value { color: var(--success); }
.space-status-item.status-libre { border-bottom: 3px solid var(--success); }

.space-status-item.status-ocupado .status-value { color: var(--danger); }
.space-status-item.status-ocupado { border-bottom: 3px solid var(--danger); }

.space-status-item.status-mantenimiento .status-value { color: var(--warning); }
.space-status-item.status-mantenimiento { border-bottom: 3px solid var(--warning); }

.space-status-item.status-reservado .status-value { color: var(--info); }
.space-status-item.status-reservado { border-bottom: 3px solid var(--info); }

/* Dashboard Columns */
.dashboard-two-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 1.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(94, 75, 140, 0.15);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(94, 75, 140, 0.25);
}

.btn-secondary {
    background-color: #fafbfc;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: #cbd5e0;
}

.btn-danger {
    background-color: var(--danger);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(239, 68, 68, 0.15);
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-success {
    background-color: var(--success);
    color: #ffffff;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.15);
}

.btn-success:hover {
    background-color: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    text-align: left;
}

.table th {
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #fafbfc;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    vertical-align: middle;
    color: var(--text-primary);
}

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

.table tr:hover td {
    background-color: #fafbfc;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.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.15); color: #d97706; }
.badge-info { background: rgba(59, 130, 246, 0.1); color: #2563eb; }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-md);
    background-color: #ffffff;
    border: 1px solid #d2d6dc;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(94, 75, 140, 0.15);
}

.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

/* Mausoleum Spaces Map Grid */
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.map-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Mausoleum Grid Styling */
.mausoleum-grid-container {
    padding: 1.5rem;
    overflow-x: auto;
    background: #fafbfc;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.mausoleum-grid {
    display: table;
    margin: 0 auto;
    border-spacing: 8px;
}

.grid-row {
    display: table-row;
}

.grid-row-header {
    display: table-cell;
    vertical-align: middle;
    text-align: right;
    padding-right: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.grid-col-headers {
    display: table-row;
}

.grid-col-header-empty {
    display: table-cell;
}

.grid-col-header {
    display: table-cell;
    text-align: center;
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding-bottom: 10px;
}

/* Grid Space Block */
.grid-space {
    display: table-cell;
    width: 70px;
    height: 70px;
    border-radius: var(--radius-sm);
    text-align: center;
    vertical-align: middle;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-space:hover {
    transform: scale(1.08);
    z-index: 10;
    box-shadow: 0 10px 15px -3px rgba(94, 75, 140, 0.15);
}

.space-libre {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.space-libre:hover {
    background-color: var(--success);
    color: #ffffff;
    border-color: var(--success);
}

.space-ocupado {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.space-ocupado:hover {
    background-color: var(--danger);
    color: #ffffff;
    border-color: var(--danger);
}

.space-reservado {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #2563eb;
}

.space-reservado:hover {
    background-color: var(--info);
    color: #ffffff;
    border-color: var(--info);
}

.space-mantenimiento {
    background-color: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: #d97706;
}

.space-mantenimiento:hover {
    background-color: var(--warning);
    color: #ffffff;
    border-color: var(--warning);
}

.space-alerta {
    background-color: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.2);
    color: #7c3aed;
}

.space-alerta:hover {
    background-color: #7c3aed;
    color: #ffffff;
    border-color: #7c3aed;
}

/* Tooltips */
.space-tooltip {
    display: none;
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    background: #1e293b;
    border: 1px solid #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    color: #ffffff;
    text-align: left;
    z-index: 200;
    pointer-events: none;
    line-height: 1.4;
}

.space-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.grid-space:hover .space-tooltip {
    display: block;
}

.tooltip-title {
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
    color: #a78bfa;
    font-size: 0.85rem;
}

.tooltip-item {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.tooltip-label {
    color: #94a3b8;
    font-weight: 600;
}

/* Auth / Login Page Redesign */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at 10% 20%, #f0ecfa 0%, #dbd5f0 90%);
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before,
.auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    z-index: 0;
}

.auth-wrapper::before {
    width: 350px;
    height: 350px;
    background: rgba(94, 75, 140, 0.08);
    top: -80px;
    left: -80px;
}

.auth-wrapper::after {
    width: 500px;
    height: 500px;
    background: rgba(62, 38, 123, 0.06);
    bottom: -150px;
    right: -150px;
}

.auth-card-wrapper {
    width: 100%;
    max-width: 460px;
    z-index: 1;
}

.auth-card {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 15px 35px rgba(94, 75, 140, 0.1);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.25rem;
}

.auth-logo-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.auth-logo-brand i {
    background-color: rgba(94, 75, 140, 0.1);
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.auth-title {
    font-size: 1.15rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.form-input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input-icon-wrapper .input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 1.05rem;
    transition: color 0.2s;
}

.form-input-icon-wrapper .form-control {
    padding-left: 2.75rem;
    height: 46px;
}

.form-input-icon-wrapper .form-control:focus + .input-icon {
    color: var(--primary);
}

.btn-block {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    font-size: 0.95rem;
    height: 46px;
}

.demo-credentials {
    margin-top: 2rem;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    font-size: 0.8rem;
}

.demo-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-secondary);
}

/* Receipt / Invoice Print styles */
.receipt-container {
    max-width: 700px;
    margin: 2rem auto;
    background: #fff;
    color: #000;
    padding: 2.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 6px rgb(0 0 0 / 0.05);
    border: 1px solid #e2e8f0;
}

.receipt-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.receipt-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
}

.receipt-logo {
    text-align: right;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.receipt-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.receipt-section-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.25rem;
    margin-bottom: 0.5rem;
}

.receipt-item {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.receipt-item strong {
    color: #334155;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.receipt-table th {
    background: #f8fafc;
    color: #475569;
    padding: 0.75rem;
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.receipt-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
}

.receipt-total-row {
    font-weight: 700;
    font-size: 1.1rem;
    background: #f8fafc;
}

.receipt-footer {
    text-align: center;
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 3rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
}

.print-actions {
    max-width: 700px;
    margin: 1rem auto;
    display: flex;
    justify-content: space-between;
}

@media print {
    body {
        background: #fff !important;
        color: #000 !important;
    }
    .print-actions {
        display: none !important;
    }
    .receipt-container {
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* Responsiveness & Mobile Adaptations */
.sidebar-toggle-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99;
}

@media (max-width: 1024px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        bottom: 0;
        width: 280px;
        z-index: 100;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar-open .sidebar {
        transform: translateX(280px);
    }
    
    .sidebar-item.active a {
        margin-right: 0;
        padding-right: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .sidebar-item.active a::before,
    .sidebar-item.active a::after {
        display: none;
    }
    
    .top-navbar {
        padding: 0 1.25rem;
        height: 70px;
    }
    
    .content-container {
        padding: 1.25rem;
    }
}

@media (max-width: 768px) {
    .dashboard-two-columns {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .top-navbar {
        height: 65px;
    }
    
    .greeting-text {
        display: none;
    }
    
    .user-fullname {
        font-size: 0.95rem;
    }
    
    .top-navbar-right {
        gap: 0.75rem;
    }
    
    .navbar-badge-item {
        display: none; /* Hide calendar badge on mobile topbar */
    }
    
    .card {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        border-radius: var(--radius-md);
    }
    
    .spaces-status-container {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    .space-status-item {
        padding: 1rem 0.75rem;
    }
    
    .status-value {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.55rem 1rem;
        font-size: 0.85rem;
    }
    
    .table th, .table td {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .auth-card {
        padding: 1.75rem;
    }
    
    .auth-logo-brand {
        font-size: 1.8rem;
    }
    
    .auth-logo-brand i {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .auth-title {
        font-size: 1rem;
    }
}
