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

:root {
    /* Color Palette - Cyber Dark Slate Theme */
    --bg-base: #0b0f19;
    --bg-surface: rgba(20, 28, 48, 0.7);
    --bg-input: rgba(30, 41, 69, 0.5);

    --primary: #00f2fe;
    /* Neon Blue/Teal */
    --primary-hover: #4facfe;
    --secondary: #9b51e0;
    /* Neon Purple */
    --success: #00e676;
    /* Bright Green */
    --danger: #ff1744;
    /* Bright Red */
    --warning: #ffea00;
    /* Bright Yellow */

    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);

    /* Layout Constants */
    --font-sans: 'Outfit', sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-sans);
    font-size: 15px;
    background-color: var(--bg-base);
    background-image:
        radial-gradient(at 0% 0%, rgba(155, 81, 224, 0.08) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(0, 242, 254, 0.08) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Utilities */
.glass {
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-md);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout - App & Sidebar */
.app-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar.sidebar-collapsed {
    width: 80px;
    padding-left: 16px;
    padding-right: 16px;
}
.sidebar.sidebar-collapsed .logo-text,
.sidebar.sidebar-collapsed .menu-text,
.sidebar.sidebar-collapsed .brand-logo {
    display: none;
}
.sidebar.sidebar-collapsed .sidebar-logo {
    justify-content: center !important;
}
.sidebar.sidebar-collapsed .sidebar-menu a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

.sidebar-logo img {
    width: 32px;
    height: 32px;
}

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

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

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 3px 0 0 var(--primary);
}

.main-content {
    flex-grow: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow-y: auto;
}

/* Header */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--bg-base);
}

/* Cards & Dashboard Widgets */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

/* Forms & Inputs */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

label {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input,
select,
textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0, 242, 254, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: none;
    font-family: var(--font-sans);
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: var(--bg-base);
}

.btn-primary:hover {
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

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

.btn-danger:hover {
    box-shadow: 0 0 16px rgba(255, 23, 68, 0.4);
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th,
td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

/* Badge styles */
.badge {
    display: inline-flex;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(0, 230, 118, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(255, 23, 68, 0.15);
    color: var(--danger);
}

.badge-warning {
    background: rgba(255, 234, 0, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(0, 242, 254, 0.15);
    color: var(--primary);
}

/* Kiosk Layout (Self-service guest check-in) */
.kiosk-container {
    max-width: 800px;
    margin: 40px auto;
    width: 90%;
}

.kiosk-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.camera-preview {
    width: 100%;
    height: 320px;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    border: 2px solid var(--border);
}

.camera-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-preview canvas {
    display: none;
}

.camera-shutter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    border: 4px solid var(--primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.camera-shutter:hover {
    transform: translateX(-50%) scale(1.1);
}

/* Modal styling */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(11, 15, 25, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal-content {
    width: 90%;
    max-width: 500px;
    padding: 32px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Offline Banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--danger);
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: 600;
    z-index: 2000;
    display: none;
}

/* Canvas signature styling */
.signature-pad {
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    cursor: crosshair;
    width: 100%;
    height: 200px;
}

/* Toast container for micro-animations notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3000;
}

.toast {
    padding: 16px 24px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

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

/* Responsive fixes */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 16px;
    }

    .main-content {
        padding: 24px;
    }
}