/**
 * Valplaude - Premium Design System
 * Modern, Glassy, Attio/Linea Inspired
 */

/* ===== CSS Variables ===== */
:root {
    /* Core Colors */
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --light-grey: #F4F4F5;
    --border-grey: #E4E4E7;
    --medium-grey: #A1A1AA;
    --dark-grey: #71717A;
    --charcoal: #3F3F46;
    --black: #18181B;
    --pure-black: #09090B;

    /* Accent Colors */
    --success: #22C55E;
    --success-soft: rgba(34, 197, 94, 0.1);
    --warning: #F59E0B;
    --warning-soft: rgba(245, 158, 11, 0.1);
    --danger: #EF4444;
    --danger-soft: rgba(239, 68, 68, 0.1);
    --info: #3B82F6;
    --info-soft: rgba(59, 130, 246, 0.1);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 24px 80px rgba(0, 0, 0, 0.16);

    /* Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
}

/* ===== Google Font Import ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 50%, #DEE2E6 100%);
    background-attachment: fixed;
    color: var(--black);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* ===== App Layout ===== */
.root-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    width: 100%;
}

.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: var(--pure-black);
    height: 100%;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
    overflow-y: auto;
    /* Custom Scrollbar for Sidebar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FFFFFF 0%, #E5E5E5 100%);
    color: var(--pure-black);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.sidebar-brand span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
}

.sidebar-nav {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.sidebar-nav-item {
    margin-bottom: 4px;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-nav-link svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.sidebar-nav-link.active svg {
    opacity: 1;
}

.sidebar-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 12px;
    padding: 0 14px;
    font-weight: 600;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white);
}

.sidebar-user-info {
    flex: 1;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--white);
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: capitalize;
}

.sidebar-user a {
    color: rgba(255, 255, 255, 0.4);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.sidebar-user a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    text-decoration: none;
    padding: 8px;
    margin: -8px;
    margin-right: 0;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.sidebar-user-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Sidebar Logout Button - Mobile Friendly */
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    margin: 12px;
    margin-top: 0;
    background: rgba(239, 68, 68, 0.15);
    color: #FCA5A5;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-base);
    text-decoration: none;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #FECACA;
}

.sidebar-logout-btn svg {
    flex-shrink: 0;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    padding: 32px 40px;
    height: 100%;
    overflow-y: auto;
    position: relative;
}

/* ===== Page Header ===== */
.page-header {
    margin-bottom: 32px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.025em;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--dark-grey);
    font-size: 0.95rem;
    font-weight: 400;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* ===== Cards - Glass Effect ===== */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-grey);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    overflow: hidden;
}

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

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-grey);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.5);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--black);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-grey);
    background: rgba(0, 0, 0, 0.02);
}

/* ===== Stats Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-grey);
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--black), var(--charcoal));
    opacity: 0;
    transition: var(--transition-base);
}

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

.stat-card:hover::before {
    opacity: 1;
}

.stat-card-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.stat-card-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-card-change {
    font-size: 0.8rem;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-card-change.positive {
    color: var(--success);
}

.stat-card-change.negative {
    color: var(--danger);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    font-family: inherit;
}

.btn-primary {
    background: var(--black);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: var(--charcoal);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--border-grey);
}

.btn-secondary:hover {
    background: var(--light-grey);
    border-color: var(--medium-grey);
}

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

.btn-success:hover {
    background: #16A34A;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--black);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    /* Better for mobile to prevent zoom */
    font-family: inherit;
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--black);
    transition: var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.form-control::placeholder {
    color: var(--medium-grey);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2371717A' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 44px;
}

.form-text {
    font-size: 0.8rem;
    color: var(--dark-grey);
    margin-top: 8px;
}

.form-error {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 8px;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-pending {
    background: var(--warning-soft);
    color: #B45309;
}

.badge-approved {
    background: var(--success-soft);
    color: #15803D;
}

.badge-rejected {
    background: var(--danger-soft);
    color: #B91C1C;
}

.badge-category {
    background: var(--light-grey);
    color: var(--charcoal);
    font-size: 0.65rem;
    padding: 4px 10px;
}

.badge-it {
    background: var(--info-soft);
    color: #1D4ED8;
}

.badge-hr {
    background: #F3E8FF;
    color: #7C3AED;
}

.badge-finance {
    background: var(--success-soft);
    color: #15803D;
}

.badge-other {
    background: var(--light-grey);
    color: var(--charcoal);
}

/* ===== Tables ===== */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 14px 20px;
    text-align: left;
}

.table th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dark-grey);
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border-grey);
}

.table td {
    border-bottom: 1px solid var(--border-grey);
    color: var(--charcoal);
    font-size: 0.9rem;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

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

/* ===== Request Cards ===== */
.request-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.request-card {
    display: flex;
    align-items: center;
    padding: 20px 24px;
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    cursor: pointer;
}

.request-card:hover {
    border-color: var(--medium-grey);
    box-shadow: var(--shadow-sm);
    transform: translateX(4px);
}

.request-card-content {
    flex: 1;
}

.request-card-title {
    font-weight: 600;
    color: var(--black);
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.request-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--dark-grey);
}

.request-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ===== Alerts ===== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-soft);
    color: #15803D;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alert-danger {
    background: var(--danger-soft);
    color: #B91C1C;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: var(--warning-soft);
    color: #B45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: var(--info-soft);
    color: #1D4ED8;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.6;
    color: inherit;
    padding: 4px;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== Login Page ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #09090B 0%, #18181B 50%, #27272A 100%);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    animation: subtle-pulse 8s ease-in-out infinite;
}

@keyframes subtle-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 48px 40px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.login-logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.03em;
}

.login-logo p {
    color: var(--dark-grey);
    margin-top: 8px;
    font-size: 0.95rem;
}

.login-form .btn {
    width: 100%;
    margin-top: 8px;
}

/* ===== Auth Page Elements ===== */
.form-helper {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.forgot-password-link {
    font-size: 0.8rem;
    color: var(--dark-grey);
    text-decoration: none;
    transition: var(--transition-fast);
}

.forgot-password-link:hover {
    color: var(--black);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-grey);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 0.8rem;
    color: var(--medium-grey);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 20px;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-base);
    text-decoration: none;
}

.btn-google:hover {
    background: var(--light-grey);
    border-color: var(--medium-grey);
    transform: translateY(-1px);
}

.btn-google svg {
    flex-shrink: 0;
}

.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links p {
    font-size: 0.875rem;
    color: var(--dark-grey);
    margin: 0;
}

.auth-links a {
    color: var(--black);
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-fast);
}

.auth-links a:hover {
    text-decoration: underline;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--dark-grey);
}

.empty-state-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    opacity: 0.4;
}

.empty-state-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.empty-state-text {
    margin-bottom: 24px;
    font-size: 0.9rem;
}

/* ===== Detail View ===== */
.detail-section {
    margin-bottom: 28px;
}

.detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--dark-grey);
    margin-bottom: 8px;
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--black);
    line-height: 1.6;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 28px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(9, 9, 11, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.98);
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-xl);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-grey);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--medium-grey);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--light-grey);
    color: var(--black);
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-grey);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: rgba(0, 0, 0, 0.02);
}

/* ===== Filters ===== */
.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-grey);
    background: var(--white);
    color: var(--dark-grey);
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--medium-grey);
    color: var(--black);
}

.filter-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

/* ===== File Upload ===== */
.file-upload {
    border: 2px dashed var(--border-grey);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
    background: rgba(0, 0, 0, 0.01);
}

.file-upload:hover {
    border-color: var(--medium-grey);
    background: rgba(0, 0, 0, 0.02);
}

.file-upload input {
    display: none;
}

.file-upload-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 16px;
    color: var(--medium-grey);
}

.file-upload-text {
    color: var(--dark-grey);
    font-size: 0.875rem;
    line-height: 1.6;
}

.file-upload-text span {
    color: var(--black);
    font-weight: 600;
}

/* ===== Grid Layout for Dashboard ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.dashboard-grid-full {
    grid-column: 1 / -1;
}

/* ===== Utilities ===== */
.text-muted {
    color: var(--dark-grey);
}

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

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

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

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

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

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

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

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

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

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

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

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

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

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

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

.flex {
    display: flex;
}

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

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

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

/* ===== Mobile Header ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--pure-black);
    z-index: 99;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-header-brand .sidebar-brand-icon {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
}

.mobile-header-brand span {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: -0.02em;
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--white);
    padding: 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ===== Sidebar Overlay ===== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Mobile Card Views ===== */
.mobile-cards {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
}

.mobile-card {
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-md);
    padding: 16px;
}

.mobile-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.mobile-card-title {
    font-weight: 600;
    color: var(--black);
    font-size: 0.95rem;
    line-height: 1.4;
}

.mobile-card-subtitle {
    font-size: 0.8rem;
    color: var(--dark-grey);
    margin-top: 4px;
}

.mobile-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.mobile-card-label {
    color: var(--dark-grey);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-card-value {
    color: var(--black);
    font-weight: 500;
}

.mobile-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-grey);
}

.mobile-card-actions .btn {
    flex: 1;
}

/* ===== Responsive - Desktop First ===== */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* Show mobile header */
    .mobile-header {
        display: flex;
    }

    /* Show sidebar overlay */
    .sidebar-overlay {
        display: block;
    }

    /* Sidebar becomes slide-in drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100dvh;
        /* Dynamic Viewport Height for mobile browsers */
        transform: translateX(-100%);
        transition: transform var(--transition-smooth);
        z-index: 1000;
        /* Above everything */
        padding-bottom: 80px;
        /* Safe space for bottom items */
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Adjust main content */
    .main-content {
        margin-left: 0 !important;
        padding: 80px 16px 24px;
        /* Top padding for fixed mobile header */
        width: 100% !important;
        flex: none !important;
        height: 100% !important;
        /* Fill app-container */
        overflow-y: auto;
        box-sizing: border-box;
        display: block;
        position: relative;
    }

    .app-container {
        height: 100%;
        overflow: hidden;
        width: 100%;
    }

    /* Stats grid to single column */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Stat cards smaller on mobile */
    .stat-card {
        padding: 16px;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }

    /* Page header stacks */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .page-actions {
        width: 100%;
        flex-direction: column;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Page title smaller */
    .page-title {
        font-size: 1.5rem;
    }

    /* Card header stacks on mobile */
    .card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .card-body {
        padding: 16px;
    }

    /* Filters wrap nicely */
    .filters {
        width: 100%;
        justify-content: flex-start;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
        padding: 10px 12px;
    }

    /* Tables hidden on mobile (replaced with cards) */
    .table-desktop {
        display: none !important;
    }

    /* Show mobile cards */
    .mobile-cards {
        display: flex;
    }

    /* Request cards adjust for mobile */
    .request-card {
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
    }

    .request-card-actions {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border-grey);
        justify-content: space-between;
    }

    /* Detail view grid stacks */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Two-column layout stacks */
    .detail-layout {
        grid-template-columns: 1fr !important;
    }

    .detail-layout>div:last-child {
        order: -1;
        /* Action card first on mobile */
    }

    /* Buttons full width in action areas */
    .action-buttons .btn {
        width: 100%;
    }

    /* Form buttons stack */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Modal adjustments */
    .modal {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        padding: 16px 20px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Filter bar stacks */
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    /* Empty state padding */
    .empty-state {
        padding: 40px 20px;
    }

    /* Pagination stacks */
    .pagination {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .pagination-nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 20px;
    }
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    border-top: 1px solid var(--border-grey);
    margin-top: 24px;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--dark-grey);
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--charcoal);
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled):not(.active) {
    background: var(--light-grey);
    border-color: var(--medium-grey);
}

.pagination-btn.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: var(--dark-grey);
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--medium-grey);
    pointer-events: none;
}

.search-input {
    width: 280px;
    padding: 10px 16px 10px 42px;
    font-size: 0.875rem;
    font-family: inherit;
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--black);
    transition: var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.08);
}

.search-input::placeholder {
    color: var(--medium-grey);
}

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--white);
    border: 1px solid var(--border-grey);
    border-radius: var(--radius-lg);
}

.filter-bar form {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

/* ===== Priority Badges ===== */
.badge-priority-low {
    background: var(--light-grey);
    color: var(--charcoal);
}

.badge-priority-medium {
    background: var(--info-soft);
    color: #1D4ED8;
}

.badge-priority-high {
    background: var(--warning-soft);
    color: #B45309;
}

.badge-priority-urgent {
    background: var(--danger-soft);
    color: #B91C1C;
}

/* ===== Loading States ===== */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
    color: transparent !important;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 18px;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: btn-spinner 0.7s linear infinite;
}

.btn-primary.loading::after {
    border-top-color: var(--white);
}

.btn-secondary.loading::after {
    border-top-color: var(--black);
}

.btn-success.loading::after,
.btn-danger.loading::after {
    border-top-color: var(--white);
}

@keyframes btn-spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Form submitting overlay */
.form-submitting {
    position: relative;
    pointer-events: none;
}

.form-submitting::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-lg);
    z-index: 10;
}

/* ===== Confirmation Modal ===== */
.confirm-modal .modal {
    max-width: 400px;
    text-align: center;
}

.confirm-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
    justify-content: flex-end;
}

.confirm-modal .modal-body {
    padding: 16px 28px 28px;
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-modal-icon.warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.confirm-modal-icon.danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.confirm-modal-icon.success {
    background: var(--success-soft);
    color: var(--success);
}

.confirm-modal-icon svg {
    width: 28px;
    height: 28px;
}

.confirm-modal-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 8px;
}

.confirm-modal-message {
    font-size: 0.9rem;
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: 24px;
}

.confirm-modal .modal-footer {
    border-top: none;
    background: transparent;
    padding-top: 0;
    justify-content: center;
}

.confirm-modal .modal-footer .btn {
    min-width: 100px;
}

/* ===== In-App Notifications ===== */
.notification-container {
    padding: 16px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.notification-bell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 14px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    gap: 10px;
}

.notification-bell::after {
    content: 'Notifications';
    font-size: 0.9rem;
    font-weight: 500;
}

.notification-bell:hover {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.9);
}

.notification-bell svg {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

.notification-badge {
    position: absolute;
    top: 8px;
    left: 28px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.notification-dropdown {
    position: absolute;
    bottom: 100%;
    left: 12px;
    right: 12px;
    margin-bottom: 8px;
    background: rgba(30, 30, 35, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition-smooth);
    z-index: 200;
    max-height: 400px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.notification-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notification-dropdown-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-dropdown-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--white);
}

.notification-mark-all {
    background: none;
    border: none;
    color: var(--info);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.notification-mark-all:hover {
    background: rgba(59, 130, 246, 0.15);
}

.notification-dropdown-body {
    overflow-y: auto;
    max-height: 320px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
    text-decoration: none;
}

.notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(59, 130, 246, 0.08);
}

.notification-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--info);
}

.notification-item-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-item-icon svg {
    width: 18px;
    height: 18px;
}

.notification-success .notification-item-icon {
    background: var(--success-soft);
    color: var(--success);
}

.notification-danger .notification-item-icon {
    background: var(--danger-soft);
    color: var(--danger);
}

.notification-info .notification-item-icon {
    background: var(--info-soft);
    color: var(--info);
}

.notification-default .notification-item-icon {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.notification-item-content {
    flex: 1;
    min-width: 0;
}

.notification-item-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item-message {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.4;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notification-item-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
}

.notification-empty {
    padding: 40px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
}

.notification-empty svg {
    margin-bottom: 12px;
    opacity: 0.5;
}

.notification-empty p {
    font-size: 0.85rem;
}

/* Mobile adjustments for notifications */
@media (max-width: 767px) {
    .notification-dropdown {
        position: fixed;
        bottom: auto;
        top: 60px;
        left: 16px;
        right: 16px;
        margin-bottom: 0;
        max-height: calc(100vh - 100px);
    }
}

/* ===== Beta & Demo Banners ===== */
.beta-banner-global {
    background: linear-gradient(90deg, #18181B, #27272A);
    color: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.beta-banner-tag {
    background: #4F46E5;
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.demo-banner-global {
    background: #F59E0B;
    color: #FFFFFF;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 50;
}

.feedback-sidebar-box {
    margin: 16px 12px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.feedback-sidebar-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
    line-height: 1.4;
}

.feedback-sidebar-link {
    font-size: 0.8rem;
    color: #818CF8;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.feedback-sidebar-link:hover {
    color: #A5B4FC;
    text-decoration: underline;
}

.landing-beta-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(79, 70, 229, 0.1);
    border: 1px solid rgba(79, 70, 229, 0.2);
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.85rem;
    color: #818CF8;
    margin-bottom: 24px;
    font-weight: 500;
}