@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&family=Newsreader:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

/* ============================================
   HIRDASOFT DESIGN SYSTEM — v2.0
   Aesthetic: Editorial Luxury
   Font: Outfit (display) + Newsreader (serif accent) + JetBrains Mono (data)
   Palette: Warm Stone neutrals + Teal accent
   ============================================ */
:root {
    /* Typography */
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Newsreader', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;

    /* Warm Stone Neutrals */
    --stone-50: #fafaf9;
    --stone-100: #f5f5f4;
    --stone-200: #e7e5e4;
    --stone-300: #d6d3d1;
    --stone-400: #a8a29e;
    --stone-500: #78716c;
    --stone-600: #57534e;
    --stone-700: #44403c;
    --stone-800: #292524;
    --stone-900: #1c1917;
    --stone-950: #0c0a09;

    /* Accent — Teal */
    --accent: #0d9488;
    --accent-light: #ccfbf1;
    --accent-mid: #14b8a6;
    --accent-dark: #0f766e;
    --accent-glow: rgba(13, 148, 136, 0.12);

    /* Semantic Colors */
    --color-success: #16a34a;
    --color-warning: #d97706;
    --color-error: #dc2626;
    --color-info: #2563eb;

    /* Surfaces */
    --bg-app: #f8f7f6;
    --bg-card: #ffffff;
    --bg-elevated: #ffffff;
    --bg-inset: var(--stone-100);
    --bg-overlay: rgba(12, 10, 9, 0.55);
    --bg-frosted: rgba(255, 255, 255, 0.72);

    /* Text */
    --text-primary: var(--stone-900);
    --text-secondary: var(--stone-500);
    --text-tertiary: var(--stone-400);
    --text-white: #ffffff;
    --text-accent: var(--accent);

    /* Borders */
    --border-default: var(--stone-200);
    --border-subtle: var(--stone-100);
    --border-strong: var(--stone-300);

    /* Shadows — tinted warm */
    --shadow-xs: 0 1px 2px rgba(28, 25, 23, 0.04);
    --shadow-sm: 0 2px 6px rgba(28, 25, 23, 0.04), 0 1px 2px rgba(28, 25, 23, 0.02);
    --shadow-md: 0 4px 16px rgba(28, 25, 23, 0.06), 0 2px 4px rgba(28, 25, 23, 0.03);
    --shadow-lg: 0 12px 40px rgba(28, 25, 23, 0.08), 0 4px 12px rgba(28, 25, 23, 0.04);
    --shadow-xl: 0 24px 56px rgba(28, 25, 23, 0.12), 0 8px 20px rgba(28, 25, 23, 0.06);
    --shadow-accent: 0 4px 20px rgba(13, 148, 136, 0.18);

    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Motion — custom spring curves */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.32, 0.72, 0, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration-fast: 150ms;
    --duration-normal: 250ms;
    --duration-slow: 400ms;
    --duration-reveal: 700ms;

    /* Layout */
    --navbar-height: 60px;
    --sidebar-width-collapsed: 64px;
    --sidebar-width-expanded: 248px;

    /* Legacy compat */
    --primary-color: var(--stone-900);
    --primary-dark: var(--stone-950);
    --secondary-color: var(--stone-800);
    --bg-primary: var(--bg-app);
    --bg-secondary: var(--bg-card);
    --border-color: var(--border-default);
    --border-radius: var(--radius-md);
    --border-radius-sm: var(--radius-sm);
    --border-radius-lg: var(--radius-lg);
    --card-bg: var(--bg-card);
    --card-shadow: var(--shadow-sm);
    --card-border-radius: var(--radius-lg);
    --navbar-bg: var(--stone-950);
    --input-bg: var(--bg-card);
    --input-border: 1.5px solid var(--border-default);
    --input-focus-border: var(--accent);
    --input-focus-shadow: 0 0 0 3px var(--accent-glow);
    --btn-primary-bg: var(--stone-900);
    --btn-primary-hover-shadow: 0 4px 12px rgba(28, 25, 23, 0.15);
    --transition-fast: var(--duration-fast) var(--ease-out);
    --transition-normal: var(--duration-normal) var(--ease-out);
    --transition-slow: var(--duration-slow) var(--ease-out);
    --zinc-50: var(--stone-50);
    --zinc-100: var(--stone-100);
    --zinc-200: var(--stone-200);
    --zinc-300: var(--stone-300);
    --zinc-400: var(--stone-400);
    --zinc-500: var(--stone-500);
    --zinc-600: var(--stone-600);
    --zinc-700: var(--stone-700);
    --zinc-800: var(--stone-800);
    --zinc-900: var(--stone-900);
    --zinc-950: var(--stone-950);
    --accent-light: #ccfbf1;
    --accent-dark: #0f766e;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    font-family: var(--font-display);
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    background: var(--bg-app);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    text-rendering: optimizeLegibility;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.6;
    letter-spacing: -0.011em;
}

body:not(.landing-page) {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

body.landing-page {
    overflow: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
}

body.landing-page .landing-content-wrapper,
.landing-page .landing-content-wrapper {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
}

body > div, body > component, #app, #blazor-error-ui {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

h1:focus { outline: none; }

/* Subtle grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* ============================================
   TYPOGRAPHY — Editorial Hierarchy
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-top: 0;
}

h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.035em; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
h6 { font-size: 0.875rem; font-weight: 600; }

.font-serif { font-family: var(--font-serif); }

.font-mono, .badge, .kpi-card h3,
[data-type="currency"], [data-type="number"] {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

.tabular-nums {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Eyebrow — tiny uppercase label preceding headings */
.eyebrow {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 0.5rem;
    display: block;
}

/* ============================================
   LINKS & INTERACTIVE BASE
   ============================================ */
a, .btn-link {
    color: var(--text-primary);
    transition: color var(--duration-fast) var(--ease-out);
    text-decoration-color: var(--border-default);
    text-underline-offset: 3px;
}

a:hover, .btn-link:hover {
    color: var(--accent-dark);
}

/* ============================================
   BUTTONS — Haptic with Double-Bezel
   ============================================ */
.btn {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: -0.01em;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.25rem;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    line-height: 1.5;
}

.btn:active {
    transform: scale(0.97) translateY(1px);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus {
    box-shadow: 0 0 0 3px var(--accent-glow);
    outline: none;
}

.btn-primary {
    color: var(--text-white) !important;
    background: var(--stone-900) !important;
    border: 1px solid var(--stone-900) !important;
    box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,0.06);
}

.btn-primary:hover {
    background: var(--stone-800) !important;
    box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.97) translateY(0);
    background: var(--stone-950) !important;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
    background: var(--stone-50);
    border-color: var(--border-strong);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-success {
    background: var(--accent);
    border: 1px solid var(--accent);
    color: white;
    box-shadow: var(--shadow-accent);
}

.btn-success:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.3);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--color-error);
    border: 1px solid var(--color-error);
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

.btn-warning {
    background: var(--color-warning);
    border: 1px solid var(--color-warning);
    color: var(--stone-900);
}

.btn-warning:hover {
    background: #b45309;
    color: white;
}

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

.btn-info:hover {
    background: #1d4ed8;
}

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

.btn-outline-primary:hover {
    background: var(--stone-50);
    border-color: var(--stone-900);
    color: var(--stone-900);
}

.btn-outline-danger {
    background: transparent;
    border: 1.5px solid var(--border-default);
    color: var(--color-error);
}

.btn-outline-danger:hover {
    background: #fef2f2;
    border-color: var(--color-error);
}

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

.btn-outline-secondary:hover {
    background: var(--stone-50);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 1rem;
}

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem 0.75rem;
}

.btn-ghost:hover {
    background: var(--stone-100);
    color: var(--text-primary);
}

/* ============================================
   FORM ELEMENTS — Refined Inputs
   ============================================ */
.form-control {
    font-family: var(--font-display);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-xs);
}

.form-control:hover {
    border-color: var(--border-strong);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-select {
    font-family: var(--font-display);
    border: 1.5px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    font-size: 0.875rem;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-xs);
}

.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: var(--bg-card);
}

.form-check-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    letter-spacing: 0;
}

.form-control-sm {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
}

.form-control-lg, .form-select-lg {
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    flex: 1;
}

.input-group .btn {
    flex-shrink: 0;
}

.input-group-text {
    background: var(--stone-50);
    border: 1.5px solid var(--border-default);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.valid.modified:not([type=checkbox]) {
    outline: none;
    border-color: var(--color-success);
}

.invalid {
    outline: none;
    border-color: var(--color-error);
}

.validation-message {
    color: var(--color-error);
    font-size: 0.8125rem;
    margin-top: 0.25rem;
}

/* ============================================
   APP SHELL — Flex Layout Container
   ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

/* ============================================
   TOP NAVBAR — Frosted Glass Bar
   ============================================ */
.top-navbar {
    background: var(--stone-950);
    color: white;
    padding: 0;
    z-index: 1000;
    width: 100%;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.navbar-container {
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    height: var(--navbar-height);
    width: 100%;
    margin: 0;
}

.navbar-brand {
    color: white !important;
    font-size: 1.125rem;
    font-weight: 800;
    text-decoration: none;
    margin-right: 2.5rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) var(--ease-out);
    letter-spacing: -0.025em;
}

.navbar-brand:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white !important;
}

.navbar-menu {
    display: flex;
    flex-direction: row;
    gap: 2px;
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.navbar-menu .nav-link {
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.4rem 0.75rem;
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: all var(--duration-normal) var(--ease-out);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
    position: relative;
}

.navbar-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.9) !important;
}

.navbar-menu .nav-link.active {
    background: rgba(13, 148, 136, 0.15);
    color: #5eead4 !important;
    font-weight: 600;
}

.navbar-menu .nav-link i {
    font-size: 0.9rem;
    opacity: 0.65;
}

.navbar-menu .nav-link.active i {
    opacity: 1;
}

/* Brand icon */
.brand-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent-mid), var(--accent-dark));
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.8rem;
}

.sidebar-nav .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* User section */
.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    padding-left: 1.25rem;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.nav-user-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.6rem 0.3rem 0.3rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-user-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.nav-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-mid), var(--accent-dark));
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.nav-avatar-lg {
    width: 38px;
    height: 38px;
    font-size: 0.8rem;
}

.navbar-user .user-greeting {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.nav-chevron {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform var(--duration-normal) var(--ease-out);
}

/* User Dropdown */
.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    min-width: 220px;
    z-index: 1100;
    animation: dropdownReveal var(--duration-normal) var(--ease-out);
    overflow: hidden;
}

@keyframes dropdownReveal {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}

.dropdown-user-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--stone-900);
    letter-spacing: -0.01em;
}

.dropdown-user-role {
    font-size: 0.75rem;
    color: var(--stone-400);
    font-weight: 500;
}

.nav-user-dropdown .dropdown-divider {
    height: 1px;
    background: var(--stone-100);
    margin: 0;
}

.nav-user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--stone-600);
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.nav-user-dropdown .dropdown-item:hover {
    background: var(--stone-50);
    color: var(--stone-900);
}

.nav-user-dropdown .dropdown-item i {
    font-size: 1rem;
    opacity: 0.6;
}

.nav-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
}

/* Sidebar avatar */
.sidebar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-mid), var(--accent-dark));
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Mobile user card */
.mobile-user-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--stone-50);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}

.navbar-user .logout-btn {
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
    transition: all var(--duration-normal) var(--ease-out);
    background: transparent;
    font-weight: 500;
}

.navbar-user .logout-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* License badge */
.license-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all var(--duration-normal) var(--ease-out);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.license-status i {
    font-size: 0.75rem;
}

.license-status.license-valid {
    background: rgba(13, 148, 136, 0.15);
    color: #5eead4;
    border: 1px solid rgba(13, 148, 136, 0.2);
}

.license-status.license-invalid {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.license-status:hover { opacity: 0.85; }

/* ============================================
   MAIN CONTENT & CONTENT WRAPPER
   ============================================ */
.main-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    width: 100%;
}

.content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    width: 100%;
    max-width: 100%;
    background: var(--bg-app);
    height: calc(100vh - var(--navbar-height));
    height: calc(100dvh - var(--navbar-height));
    max-height: calc(100vh - var(--navbar-height));
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

/* Quick Sale page — no padding, scrollable on mobile */
body.quicksale-page .content-wrapper {
    padding: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 1024px) {
    body.quicksale-page .content-wrapper {
        overflow: hidden;
    }
}

/* ============================================
   PAGE LAYOUTS — Viewport-fit System
   ============================================ */

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex: 0 0 auto;
}

.page-toolbar h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.toolbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-alerts { flex: 0 0 auto; margin-bottom: 0.5rem; }
.page-filters { flex: 0 0 auto; margin-bottom: 0.75rem; }
.page-tabs { flex: 0 0 auto; }

/* LIST PAGE */
.list-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.list-page .table-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
}

.list-page .table-card > .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 0;
}

.list-page .tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.list-page .tab-content > .tab-pane {
    display: none;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.list-page .tab-content > .tab-pane.active {
    display: flex;
}

.list-page .tab-content > .tab-pane > .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.list-page .tab-content > .tab-pane > .card > .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 0;
}

/* DataTables flex chain */
.list-page .dataTables_wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.list-page .dataTables_scroll {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.list-page .dataTables_scrollHead { flex: 0 0 auto; }

.list-page .dataTables_scrollBody {
    flex: 1;
    overflow-y: auto !important;
    overflow-x: auto !important;
    min-height: 0;
}

.list-page .dataTables_info,
.list-page .dataTables_paginate,
.list-page .dataTables_length,
.list-page .dataTables_filter {
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
}

/* DETAIL PAGE */
.detail-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.detail-page .info-card {
    flex: 0 0 auto;
    margin-bottom: 1rem;
}

.detail-page .data-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.detail-page .data-card > .card-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding: 0;
}

.detail-item { margin-bottom: 0.25rem; }

.detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    display: block;
}

.detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* FORM PAGE */
.form-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 0 auto;
    width: 100%;
    padding: 0;
}

@media (min-width: 768px) {
    .form-page {
        max-width: 720px;
        padding: 0;
    }
}

.form-page .card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.form-page .card-header { flex: 0 0 auto; }
.form-page .card-header h4 { margin: 0; font-size: 1.1rem; }

.form-page .card-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

.form-page .form-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 0.5rem;
    flex: 0 0 auto;
}

/* FIT PAGE */
.fit-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fit-page > .row {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fit-page > .row > [class*="col-"] {
    overflow-y: auto;
    min-height: 0;
}

/* ============================================
   CARDS — Warm Surfaces with Subtle Depth
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    margin-bottom: 1.25rem;
    transition: box-shadow var(--duration-normal) var(--ease-out),
                border-color var(--duration-normal) var(--ease-out);
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

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

.card-header {
    padding: 1rem 1.25rem;
    background: transparent;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background: var(--stone-50);
    border-top: 1px solid var(--border-subtle);
}

/* ============================================
   TABLES — Clean Data Display
   ============================================ */
.table {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0;
    font-size: 0.8125rem;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text-primary);
}

.table thead th {
    background: var(--stone-50);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table tbody tr {
    transition: background var(--duration-fast) var(--ease-out);
    border-bottom: 1px solid var(--border-subtle);
}

.table tbody tr:hover {
    background: var(--stone-50);
}

.table tbody td {
    padding: 0.625rem 0.875rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-subtle);
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background: transparent;
}

.table-striped > tbody > tr:nth-of-type(odd):hover > td {
    background: var(--stone-50);
}

/* ============================================
   ALERTS — Left-bordered with Warm Tones
   ============================================ */
.alert {
    border: 1px solid;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-weight: 500;
    font-size: 0.8125rem;
    border-left-width: 3px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border-color: #bbf7d0;
    border-left-color: var(--color-success);
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
    border-left-color: var(--color-error);
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
    border-left-color: var(--color-warning);
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border-color: #bfdbfe;
    border-left-color: var(--color-info);
}

/* ============================================
   BADGES — Pill-shaped
   ============================================ */
.badge {
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-family: var(--font-mono);
    line-height: 1.4;
}

.bg-primary { background: var(--stone-900) !important; }
.bg-success { background: var(--accent) !important; }
.bg-danger { background: var(--color-error) !important; }
.bg-warning { background: var(--color-warning) !important; color: var(--stone-900) !important; }
.bg-info { background: var(--color-info) !important; }
.bg-secondary { background: var(--stone-400) !important; }
.bg-light { background: var(--stone-100) !important; color: var(--text-primary) !important; }

/* Status pills — semantic */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    font-family: var(--font-mono);
}

.status-success { background: #dcfce7; color: #166534; }
.status-warning { background: #fef3c7; color: #92400e; }
.status-danger { background: #fef2f2; color: #991b1b; }
.status-info { background: #dbeafe; color: #1e40af; }
.status-neutral { background: var(--stone-100); color: var(--stone-600); }

/* ============================================
   TABS — Underline Style
   ============================================ */
.nav-tabs {
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
    gap: 0;
}

.nav-tabs .nav-link {
    padding: 0.625rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    background: none;
    transition: all var(--duration-normal) var(--ease-out);
    margin-bottom: -1px;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-strong);
}

.nav-tabs .nav-link.active {
    color: var(--accent-dark);
    border-bottom-color: var(--accent);
    font-weight: 600;
    background: none;
}

/* ============================================
   DATATABLES OVERRIDES
   ============================================ */
.dataTables_wrapper { position: relative; }
.dataTables_scroll { position: relative; }

.dataTables_scrollBody {
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.dataTables_scrollHead {
    overflow: hidden;
    border-bottom: 1px solid var(--border-default);
}

.dataTables_processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-card);
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.dataTables_filter input {
    border: 1.5px solid var(--border-default) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.4rem 0.75rem !important;
    font-size: 0.8125rem !important;
    transition: all var(--duration-normal) var(--ease-out) !important;
}

.dataTables_filter input:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
    outline: none !important;
}

.dataTables_paginate .paginate_button {
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-default) !important;
    margin: 0 2px !important;
    padding: 0.3rem 0.625rem !important;
    font-size: 0.75rem !important;
    transition: all var(--duration-fast) var(--ease-out) !important;
}

.dataTables_paginate .paginate_button.current {
    background: var(--stone-900) !important;
    color: white !important;
    border-color: var(--stone-900) !important;
}

.dataTables_paginate .paginate_button:hover:not(.current) {
    background: var(--stone-100) !important;
    border-color: var(--border-strong) !important;
    color: var(--text-primary) !important;
}

.dataTables_info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.dataTables_length select {
    border: 1.5px solid var(--border-default) !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.3rem 0.5rem !important;
    font-size: 0.8125rem !important;
}

/* DataTables mobile scroll — base is constrained, relaxed on larger screens */
.dataTables_scrollBody {
    max-height: calc(100vh - 400px) !important;
}

@media (min-width: 768px) {
    .dataTables_scrollBody {
        max-height: none !important;
    }
}

/* ============================================
   SCROLLBARS — Thin, Warm
   ============================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--stone-400); }

.content-wrapper::-webkit-scrollbar { width: 6px; }
.content-wrapper::-webkit-scrollbar-track { background: transparent; }
.content-wrapper::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 6px; }

/* ============================================
   BLAZOR ERROR UI
   ============================================ */
#blazor-error-ui {
    background: var(--bg-card);
    bottom: 0;
    box-shadow: var(--shadow-lg);
    display: none;
    left: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-top: 2px solid var(--color-error);
    font-size: 0.875rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA5Ny43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after { content: "An error has occurred."; }

/* ============================================
   BOOTSTRAP OVERRIDE — Full Width
   ============================================ */
.container, .container-fluid,
.container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.content-wrapper .container, .content-wrapper .container-fluid,
.app-container .container, .app-container .container-fluid,
.main-content .container, .main-content .container-fluid {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (min-width: 576px) { .container { max-width: 100% !important; } }
@media (min-width: 768px) { .container { max-width: 100% !important; } }
@media (min-width: 992px) { .container { max-width: 100% !important; } }
@media (min-width: 1200px) { .container { max-width: 100% !important; } }

.content-wrapper .table, .table {
    width: 100% !important;
    max-width: 100% !important;
}

.content-wrapper .row { margin-left: 0 !important; margin-right: 0 !important; }
.row { margin-left: 0 !important; margin-right: 0 !important; }

.content-wrapper .col-md-6, .content-wrapper .col-md-8, .content-wrapper .col-md-12 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.content-wrapper .btn { margin-right: 0.5rem; margin-bottom: 0.5rem; }

.content-wrapper h1, .content-wrapper h2, .content-wrapper h3 {
    margin-top: 0;
    margin-bottom: 1.25rem;
}

.content-wrapper h1 { font-size: 1.625rem; }
.content-wrapper h2 { font-size: 1.5rem; }
.content-wrapper h3 { font-size: 1.25rem; }

.content-wrapper .form-group, .content-wrapper .mb-3 { width: 100%; }
.content-wrapper .table-responsive { width: 100%; overflow-x: auto; }

/* Detail page table containers */
.details-table-container {
    overflow-y: auto;
    overflow-x: hidden;
}

.details-table-container table { margin-bottom: 0; }

.details-table-container thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--stone-50);
}

.details-table-container thead th {
    background: var(--stone-50);
    font-weight: 600;
    padding: 0.625rem 0.875rem;
    border-bottom: 1px solid var(--border-default);
    white-space: nowrap;
}

.details-table-container tbody tr:hover { background-color: var(--stone-50); }

.details-table-container tfoot {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: var(--stone-100) !important;
}

.details-table-container tfoot th, .details-table-container tfoot td {
    background-color: var(--stone-100) !important;
    font-weight: 600;
    padding: 0.625rem;
    border-top: 1px solid var(--border-default);
}

/* Dashboard widget tables */
.card .table thead {
    background-color: var(--stone-50) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

.card .table thead th {
    background-color: var(--stone-50) !important;
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    padding: 0.625rem 0.5rem !important;
    border-bottom: 1px solid var(--border-default) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}

/* ============================================
   SEARCH BOX
   ============================================ */
.search-box { position: relative; }

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    z-index: 1;
}

.search-box .form-control { padding-left: 2.75rem; }

/* ============================================
   SKELETON / LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--stone-100) 25%, var(--stone-200) 50%, var(--stone-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text { height: 1rem; width: 60%; margin-bottom: 0.5rem; }
.skeleton-text.large { height: 2rem; width: 40%; }
.skeleton-block { height: 100%; width: 100%; min-height: 120px; border-radius: var(--radius-md); }

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   ANIMATIONS — Scroll Reveals & Micro-interactions
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Page entrance */
.list-page, .detail-page, .form-page, .fit-page {
    animation: fadeIn var(--duration-slow) var(--ease-out);
}

/* ============================================
   MISC UTILITIES
   ============================================ */
.text-muted { font-size: 0.8125rem; color: var(--text-secondary) !important; }
.shadow-top { box-shadow: 0 -4px 12px rgba(28, 25, 23, 0.04); }

.offcanvas-backdrop {
    position: fixed;
    top: 0; left: 0;
    z-index: 1040;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-overlay);
}

.alert-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

/* Dashboard container */
.dashboard-container {
    width: 100%;
    height: auto;
    overflow: visible;
}

.dashboard-container .card { margin-bottom: 1.25rem; }
.dashboard-container .card-body { padding: 1.25rem; }
.dashboard-container .table-responsive { width: 100%; overflow-x: auto; }

/* Reports */
.reports-income-list, .reports-expense-list {
    max-height: calc(100vh - 450px);
    overflow-y: auto !important;
    overflow-x: auto !important;
    min-height: 300px;
}

.card-body[style*="flex: 1"] .reports-income-list,
.card-body[style*="flex: 1"] .reports-expense-list {
    height: 100%;
    max-height: 100%;
}

/* Header actions */
.header-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================
   MOBILE MENU (Hamburger Slide)
   ============================================ */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 1001;
}

.mobile-menu-toggle:hover { background: rgba(255, 255, 255, 0.12); }

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-overlay);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-menu-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    transition: left var(--duration-slow) var(--ease-out);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu-sidebar.active { left: 0; }

.mobile-menu-header {
    background: var(--stone-950);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.mobile-menu-header .navbar-brand {
    margin: 0;
    font-size: 1.1rem;
}

.mobile-menu-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1.25rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.mobile-menu-close:hover { background: rgba(255, 255, 255, 0.2); }

.mobile-menu-content {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.mobile-menu-content .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--duration-normal) var(--ease-out);
    font-weight: 500;
    font-size: 0.9rem;
}

.mobile-menu-content .nav-link:hover {
    background: var(--stone-50);
    padding-left: 1.75rem;
}

.mobile-menu-content .nav-link.active {
    background: var(--accent-glow);
    color: var(--accent-dark);
    border-left: 3px solid var(--accent);
    font-weight: 600;
}

.mobile-menu-content .nav-link i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.mobile-menu-content .nav-link.active i { color: var(--accent); }

.mobile-menu-user {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-default);
    background: var(--stone-50);
}

.mobile-menu-user .user-greeting {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: block;
    font-size: 0.875rem;
}

.mobile-menu-user .logout-btn { width: 100%; justify-content: center; }

/* ============================================
   SIDEBAR NAVIGATION (Medium Screens: 992-1399px)
   ============================================ */
.sidebar-nav {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width-collapsed);
    background: var(--stone-950);
    z-index: 1000;
    display: none;
    flex-direction: column;
    transition: width 0.3s var(--ease-out);
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-nav:hover { width: var(--sidebar-width-expanded); }

.sidebar-brand {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-height: var(--navbar-height);
    display: flex;
    align-items: center;
}

.sidebar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    white-space: nowrap;
    letter-spacing: -0.025em;
}

.sidebar-brand a:hover { color: white; }
.sidebar-brand i { font-size: 1.3rem; min-width: 28px; text-align: center; }

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    color: rgba(255, 255, 255, 0.45) !important;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s var(--ease-out);
    border: none;
    background: none;
    width: 100%;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}

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

.sidebar-link.active {
    background: rgba(13, 148, 136, 0.1);
    color: #5eead4 !important;
    border-left-color: var(--accent);
    font-weight: 600;
}

.sidebar-link i { min-width: 28px; text-align: center; font-size: 1.1rem; }

.sidebar-text {
    opacity: 0;
    transition: opacity 0.2s var(--ease-out) 0.05s;
    pointer-events: none;
}

.sidebar-nav:hover .sidebar-text {
    opacity: 1;
    pointer-events: auto;
}

.sidebar-footer {
    padding: 0.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-footer .user-info {
    cursor: default;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.4) !important;
}

.sidebar-footer .logout {
    color: rgba(255, 180, 180, 0.7) !important;
}

.sidebar-footer .logout:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #fca5a5 !important;
}

.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }

/* ============================================
   DASHBOARD — Bento Grid Layout
   ============================================ */
.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    flex: 0 0 auto;
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    margin: 0;
}

.dashboard-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0.125rem 0 0;
    font-family: var(--font-serif);
    font-style: italic;
}

.btn-new-sale {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-accent);
}

.btn-new-sale:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(13, 148, 136, 0.3);
    color: white;
}

.dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 0.5rem;
}

/* KPI Boxes — Card Grid */
.kpi-boxes {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.625rem;
    flex: 0 0 auto;
}


/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    flex: 0 0 auto;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    box-shadow: var(--shadow-xs);
}

.chart-container .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    text-align: left;
}

.chart-container .section-header h5 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.chart-wrapper {
    height: 160px;
    position: relative;
}

/* Tables Section */
.tables-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    flex: 0 0 auto;
}

.table-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.table-panel .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    text-align: left;
    margin-bottom: 0;
}

.table-panel .section-header h5 {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.section-link {
    font-size: 0.75rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: color var(--duration-fast) var(--ease-out);
}

.section-link:hover { color: var(--accent-dark); }

.table-wrapper { max-height: 200px; overflow-y: auto; }

.dashboard-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
}

.dashboard-table thead th {
    background: var(--stone-50);
    padding: 0.375rem 0.625rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 5;
}

.dashboard-table tbody td {
    padding: 0.375rem 0.625rem;
    border-bottom: 1px solid var(--border-subtle);
}

.dashboard-table tbody tr {
    transition: background var(--duration-fast) var(--ease-out);
}

.dashboard-table tbody tr:hover {
    background: var(--stone-50);
}

/* ============================================
   QUICK SALE CONTAINER
   ============================================ */
.quick-sale-container .quick-sale-row {
    height: calc(100vh - 150px);
    height: calc(100dvh - 150px);
    min-height: 500px;
    max-height: calc(100vh - 150px);
}

.quick-sale-container .quick-sale-row > [class*="col-"] {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.quick-sale-container .card.h-100 {
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

.quick-sale-container .card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.quick-sale-container .product-list,
.quick-sale-container .cart-items {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.quick-sale-container .cart-summary,
.quick-sale-container .flex-shrink-0,
.quick-sale-container .cart-sale-info,
.quick-sale-container .cart-discount-section,
.quick-sale-container .cart-action { flex-shrink: 0; }

/* ============================================
   ORDERS/CREATE PAGE
   ============================================ */
.product-catalogue-container {
    max-height: calc(100vh - 380px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.order-items-container {
    max-height: calc(100vh - 360px);
    overflow-y: auto;
    overflow-x: hidden;
}

.order-summary-card { position: sticky; top: 1rem; }

.product-card {
    cursor: pointer;
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid var(--border-subtle);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.product-catalogue-container::-webkit-scrollbar,
.order-items-container::-webkit-scrollbar { width: 5px; }
.product-catalogue-container::-webkit-scrollbar-track,
.order-items-container::-webkit-scrollbar-track { background: transparent; }
.product-catalogue-container::-webkit-scrollbar-thumb,
.order-items-container::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 6px; }

/* ============================================
   PRODUCT SEARCH DROPDOWN (Order Edit)
   ============================================ */
.product-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 320px;
    overflow-y: auto;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-top: none;
    border-radius: 0 0 var(--radius-md, 0.375rem) var(--radius-md, 0.375rem);
}

.product-search-item {
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle, #f0f0f0);
    transition: background var(--duration-fast, 0.1s) ease;
}

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

.product-search-item:hover,
.product-search-item.highlighted {
    background: var(--accent-bg, #e8f0fe);
}

@media (max-width: 575.98px) {
    .product-search-dropdown { max-height: 250px; }
    .product-search-item { padding: 0.5rem 0.65rem; font-size: 0.875rem; }
    .product-search-item .badge { font-size: 0.7rem; }
}

/* ============================================
   RESPONSIVE BREAKPOINTS — Mobile-First
   Base styles = mobile (<576px)
   ============================================ */

/* === MOBILE BASE OVERRIDES (applied to all screens, mobile-first) === */
.sidebar-nav { display: none; }
.navbar-menu { display: none; }
.navbar-user { display: none; }
.mobile-menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
}

.navbar-container {
    padding: 0.4rem 0.75rem;
    flex-wrap: wrap;
}

.navbar-brand { font-size: 0.9rem; margin-right: 1rem; }
.content-wrapper { padding: 0.5rem; }
.card { border-radius: var(--radius-sm); margin-bottom: 0.75rem; }
.card-body { padding: 0.5rem; }
.license-status { font-size: 0.625rem; padding: 0.2rem 0.4rem; }

.btn { padding: 0.55rem 1rem; font-size: 0.875rem; }
.btn-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
.form-control, .form-select { padding: 0.55rem 0.75rem; font-size: 0.875rem; }

.table { font-size: 0.8125rem; }
.table th, .table td { padding: 0.5rem; }
.dataTables_wrapper { overflow-x: auto; }
.table-responsive { -webkit-overflow-scrolling: touch; }

h3 { font-size: 1.125rem; }
h4 { font-size: 1rem; }
h5 { font-size: 0.9375rem; }

.btn-group { flex-direction: column; width: 100%; }
.btn-group .btn { width: 100%; margin-bottom: 0.5rem; }

.modal-dialog { margin: 0.5rem; }
.modal-content { border-radius: var(--radius-md); }

.nav-tabs { flex-wrap: wrap; }
.nav-tabs .nav-link { font-size: 0.8125rem; padding: 0.5rem 0.625rem; }

.product-catalogue-container { max-height: none; overflow-y: visible; }
.order-items-container { max-height: 40vh; }
.order-summary-card { position: static; }

.quick-sale-container .quick-sale-row { height: auto; min-height: auto; }
.quick-sale-container .quick-sale-row > [class*="col-"] { height: auto; }

/* Dashboard mobile base */
.dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

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

.charts-section {
    grid-template-columns: 1fr;
}

.tables-section {
    grid-template-columns: 1fr;
}

.chart-wrapper { height: 200px; min-height: 200px; }
.table-wrapper { max-height: 180px; }

/* === SM: ≥576px (Large Phone) === */
@media (min-width: 576px) {
    .navbar-container { padding: 0.5rem 1rem; }
    .navbar-brand { font-size: 0.95rem; }
    .content-wrapper { padding: 0.75rem; }
    .card { border-radius: var(--radius-md); }
    .card-body { padding: 0.75rem; }
    .license-status { font-size: 0.6875rem; padding: 0.25rem 0.625rem; }

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

/* === MD: ≥768px (Tablet) === */
@media (min-width: 768px) {
    .navbar-brand { font-size: 1rem; }
    .content-wrapper { padding: 1rem; }
    .card { margin-bottom: 1rem; }
    .card-body { padding: 1rem; }

    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    h5 { font-size: 1rem; }

    .btn-group { flex-direction: row; width: auto; }
    .btn-group .btn { width: auto; margin-bottom: 0; }

    .modal-dialog { margin: 1.75rem auto; }
    .modal-content { border-radius: var(--radius-lg); }

    .nav-tabs { flex-wrap: nowrap; }
    .nav-tabs .nav-link { font-size: 0.875rem; padding: 0.5rem 0.75rem; }

    .dashboard-header {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .chart-wrapper { height: 220px; }
}

/* === LG: ≥992px (Laptop — Sidebar Mode) === */
@media (min-width: 992px) {
    .sidebar-nav { display: flex; }
    .top-navbar { display: none; }
    .mobile-menu-overlay, .mobile-menu-sidebar { display: none !important; }
    .mobile-menu-toggle { display: none; }
    .navbar-user { display: flex; }

    .app-container {
        --navbar-height: 0px;
        padding-left: var(--sidebar-width-collapsed);
    }

    .content-wrapper {
        padding: 1.5rem;
        height: 100vh;
        height: 100dvh;
        max-height: 100vh;
    }

    .card { border-radius: var(--radius-lg); }
    .card-body { padding: 1.25rem; }

    .btn { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
    .form-control, .form-select { padding: 0.625rem 0.875rem; font-size: 0.875rem; }

    .table { font-size: 0.875rem; }
    .table th, .table td { padding: 0.625rem 0.75rem; }

    .product-catalogue-container { max-height: calc(100vh - 380px); overflow-y: auto; }
    .order-items-container { max-height: none; }
    .order-summary-card { position: sticky; top: 1rem; }

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

    .charts-section {
        grid-template-columns: 1fr 1fr;
    }

    .chart-wrapper { height: 140px; }
    .table-wrapper { max-height: 170px; }

    h3 { font-size: 1.25rem; }
}

/* === XL: ≥1400px (Desktop — Top Navbar Mode) === */
@media (min-width: 1400px) {
    .sidebar-nav { display: none; }
    .top-navbar { display: flex; }
    .navbar-menu { display: flex; }
    .navbar-user { display: flex; }
    .mobile-menu-toggle { display: none; }

    .app-container {
        --navbar-height: 60px;
        padding-left: 0;
    }

    .content-wrapper {
        height: calc(100vh - var(--navbar-height));
        height: calc(100dvh - var(--navbar-height));
        max-height: calc(100vh - var(--navbar-height));
    }

    .navbar-container { padding: 0 1.5rem; }
    .navbar-brand { font-size: 1.125rem; margin-right: 2.5rem; }

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

    .charts-section {
        grid-template-columns: minmax(0, 65%) minmax(0, 35%);
    }

    .tables-section {
        grid-template-columns: 1fr 1fr;
    }
}

/* Compact navbar for 1400-1599px */
@media (min-width: 1400px) and (max-width: 1599.98px) {
    .navbar-menu .nav-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.8rem;
    }
    .navbar-brand { margin-right: 1.5rem; }
}

/* Touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-link, .form-control, .form-select { min-height: 44px; }
    .btn-sm { min-height: 36px; }
    .table tbody tr { min-height: 44px; }
    .btn:hover, .nav-link:hover { transform: none; }
    .btn:focus, .nav-link:focus, .form-control:focus, .form-select:focus {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }
}

/* Landscape on small screens */
@media (orientation: landscape) and (max-height: 500px) {
    .navbar-container { padding: 0.4rem 1rem; }
    .content-wrapper { padding: 0.75rem; }
}

/* Safe area insets */
@supports (padding: max(0px)) {
    .mobile-menu-sidebar {
        padding-top: max(0.5rem, env(safe-area-inset-top));
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    }
    .content-wrapper {
        padding-left: max(0.75rem, env(safe-area-inset-left));
        padding-right: max(0.75rem, env(safe-area-inset-right));
    }
}

/* Print */
@media print {
    .print-only { display: block !important; }
    .no-print { display: none !important; }
    .navbar, .nav-tabs, .btn, .form-check, .card-header button { display: none !important; }
    h3 { page-break-after: avoid; }
    .table { page-break-inside: avoid; }
    .table thead { display: table-header-group !important; }
    .table tfoot { display: table-footer-group !important; }
    .card { page-break-inside: avoid; border: 1px solid #ddd; margin-bottom: 1rem; }
    .alert { page-break-after: avoid; border: 1px solid #ddd; }

    /* Layout container kisitlamalarini kaldir - icerik kesilmesin */
    html, body {
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        overflow: visible !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
    }

    .app-container {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        display: block !important;
    }

    .main-content {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        display: block !important;
    }

    .content-wrapper {
        overflow: visible !important;
        overflow-y: visible !important;
        overflow-x: visible !important;
        height: auto !important;
        max-height: none !important;
        min-height: auto !important;
        display: block !important;
    }
}

/* ============================================
   LANDING PAGE — Editorial Luxury Design
   ============================================ */
.landing-page {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    background: #faf9f7;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: hidden;
}

.landing-page.hardware-store {
    background: #faf9f7;
}

.ad-sidebar, .ad-sidebar-left, .ad-sidebar-right { display: none !important; }

.landing-content-wrapper {
    flex: 1;
    margin-left: 0;
    margin-right: 0;
    min-width: 0;
    width: 100%;
    position: relative;
}

.landing-content-wrapper::-webkit-scrollbar { width: 6px; }
.landing-content-wrapper::-webkit-scrollbar-track { background: transparent; }
.landing-content-wrapper::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 6px; }

/* Landing Nav — Frosted Glass */
.landing-nav,
.hardware-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(250, 249, 247, 0.8) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    box-shadow: 0 1px 0 rgba(28, 25, 23, 0.06) !important;
    border-bottom: none !important;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s var(--ease-out);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem !important;
    width: 100% !important;
}

.hardware-nav .container { max-width: 100% !important; padding: 0 !important; }
.hardware-nav .nav-content { max-width: 100% !important; margin: 0 !important; padding: 0 2rem !important; width: 100% !important; }

.logo-section,
.hardware-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--stone-900) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--stone-900) !important;
    background-clip: unset !important;
    letter-spacing: -0.03em;
    transition: all 0.3s var(--ease-out);
}

.logo-section:hover,
.hardware-logo:hover {
    transform: none;
}

.logo-section i,
.hardware-logo i {
    font-size: 1.75rem;
    color: var(--accent) !important;
    background: none !important;
    -webkit-text-fill-color: var(--accent) !important;
    animation: none !important;
}

.btn-login-nav,
.hardware-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: var(--stone-900) !important;
    background-size: unset !important;
    color: white !important;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-sm) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.btn-login-nav::before { display: none; }

.btn-login-nav:hover,
.hardware-btn:hover {
    background: var(--stone-800) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
    color: white !important;
}

/* Hero Section — Editorial Split */
.hero-section,
.hardware-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--stone-900) 0%, #1a2332 40%, #0f3433 100%) !important;
    background-size: 100% 100% !important;
    animation: none !important;
}

.hero-background,
.hardware-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(160deg, var(--stone-900) 0%, #1a2332 40%, #0f3433 100%) !important;
    background-size: 100% 100% !important;
    animation: none !important;
    z-index: 0;
}

.hardware-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    z-index: 1;
}

.hardware-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(13, 148, 136, 0.08) 0%, transparent 60%);
    z-index: 2;
}

.hardware-hero-image,
.hero-background-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    opacity: 0.12;
    mix-blend-mode: luminosity;
}

.hero-content,
.hardware-hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.hero-badge,
.hardware-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8) !important;
    box-shadow: none !important;
    animation: fadeInUp 0.6s var(--ease-out) !important;
}

.hero-badge i,
.hardware-badge i {
    color: var(--accent-mid) !important;
    font-size: 1rem;
    animation: none !important;
}

.hero-title,
.hardware-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: none;
    animation: fadeInUp 0.6s var(--ease-out) 0.1s both;
    letter-spacing: -0.04em;
}

.gradient-text,
.hardware-accent {
    background: linear-gradient(135deg, #5eead4, var(--accent-mid), #a7f3d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: none !important;
    display: block;
    text-shadow: none;
}

.hero-description,
.hardware-desc {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    opacity: 0.75;
    text-shadow: none;
    animation: fadeInUp 0.6s var(--ease-out) 0.2s both;
    font-weight: 400;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255, 255, 255, 0.75);
}

.hero-cta,
.hardware-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s var(--ease-out) 0.3s both;
    flex-wrap: wrap;
}

.btn-hero-primary,
.hardware-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: white !important;
    color: var(--stone-900) !important;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9375rem;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: var(--shadow-md) !important;
    border: none !important;
    position: relative;
    overflow: hidden;
}

.btn-hero-primary::before { display: none; }

.btn-hero-primary:hover,
.hardware-primary-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: var(--shadow-lg) !important;
    color: var(--stone-900) !important;
}

.btn-hero-primary i { transition: transform 0.3s var(--ease-out); }
.btn-hero-primary:hover i { transform: translateX(3px); }

.btn-hero-secondary,
.hardware-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    background: rgba(255, 255, 255, 0.06) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(255, 255, 255, 0.15) !important;
    color: white !important;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--duration-normal) var(--ease-out);
    box-shadow: none !important;
}

.btn-hero-secondary:hover,
.hardware-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
    color: white !important;
}

.hero-stats,
.hardware-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 3rem;
    animation: fadeInUp 0.6s var(--ease-out) 0.4s both;
    flex-wrap: wrap;
}

.stat-item,
.hardware-stat {
    text-align: center;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    min-width: 130px;
    transition: all var(--duration-normal) var(--ease-out);
}

.stat-item:hover,
.hardware-stat:hover {
    transform: translateY(-4px) !important;
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
}

.stat-icon,
.hardware-stat-icon {
    font-size: 1.5rem;
    color: var(--accent-mid) !important;
    margin-bottom: 0.5rem;
    animation: none !important;
}

.stat-icon i,
.hardware-stat-icon i {
    animation: none !important;
    filter: none !important;
}

.stat-label,
.hardware-stat-label {
    font-size: 0.75rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

/* Features Section */
.features-section,
.hardware-features {
    padding: 6rem 0;
    background: #ffffff;
    position: relative;
}

.section-header,
.hardware-section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
}

.section-title,
.hardware-section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--stone-900) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--stone-900) !important;
    background-clip: unset !important;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
    position: relative;
    display: inline-block;
}

.section-title::after,
.hardware-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.section-subtitle,
.hardware-section-subtitle {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    color: var(--stone-500);
    font-weight: 400;
    margin-top: 1.25rem;
    font-style: italic;
}

.features-grid,
.hardware-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card,
.hardware-feature-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--stone-200);
    transition: all var(--duration-normal) var(--ease-out);
    text-align: left;
    box-shadow: none;
}

.feature-card:hover,
.hardware-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--stone-300);
}

.feature-icon,
.hardware-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: var(--accent) !important;
    box-shadow: none !important;
    animation: none !important;
    transition: all var(--duration-normal) var(--ease-out);
}

.hardware-feature-icon i { animation: none !important; }

.feature-card:hover .feature-icon,
.hardware-feature-card:hover .hardware-feature-icon {
    transform: none;
    background: var(--accent);
    color: white !important;
}

.feature-image-wrapper,
.hardware-feature-image-wrapper {
    width: 100%;
    height: 160px;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s var(--ease-out);
}

.hardware-feature-card:hover .hardware-feature-image-wrapper {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.feature-image,
.hardware-feature-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.feature-card h3,
.hardware-feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--stone-900) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--stone-900) !important;
    background-clip: unset !important;
    margin-bottom: 0.5rem;
    transition: none;
}

.hardware-feature-card:hover h3 { transform: none; }

.feature-card p,
.hardware-feature-card p {
    color: var(--stone-500);
    line-height: 1.65;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* About Section */
.about-section,
.hardware-about {
    padding: 6rem 0;
    background: var(--stone-50);
}

.about-section::before { display: none; }

.hardware-about-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

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

.about-description,
.hardware-about-desc {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    line-height: 1.85;
    color: var(--stone-600);
    margin-bottom: 1.5rem;
}

.hardware-about-image-wrapper {
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s var(--ease-out);
}

.hardware-about-image-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.about-image,
.hardware-about-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

/* Contact Section */
.contact-section,
.hardware-contact {
    padding: 6rem 0;
    background: var(--stone-900) !important;
    background-size: unset !important;
    animation: none !important;
    position: relative;
}

.contact-section::before { display: none; }

.contact-card,
.hardware-contact-card {
    background: white !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: var(--radius-xl);
    padding: 3rem;
    box-shadow: var(--shadow-xl) !important;
    border: none !important;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    transition: all 0.3s var(--ease-out);
}

.contact-card:hover,
.hardware-contact-card:hover {
    transform: translateY(-4px);
}

.contact-info,
.hardware-contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-item,
.hardware-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--stone-50) !important;
    border-radius: var(--radius-md);
    transition: all var(--duration-normal) var(--ease-out);
    border: 1px solid transparent !important;
}

.contact-item:hover,
.hardware-contact-item:hover {
    transform: translateX(4px) !important;
    background: var(--accent-glow) !important;
    border-color: rgba(13, 148, 136, 0.15) !important;
    box-shadow: none !important;
}

.contact-icon,
.hardware-contact-icon {
    width: 44px;
    height: 44px;
    background: var(--accent) !important;
    background-size: unset !important;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    font-size: 1.125rem;
    flex-shrink: 0;
    box-shadow: none !important;
    animation: none !important;
    transition: all var(--duration-normal) var(--ease-out);
}

.hardware-contact-icon i { animation: none !important; }

.contact-item:hover .contact-icon,
.hardware-contact-item:hover .hardware-contact-icon {
    transform: none;
}

.contact-details,
.hardware-contact-details { flex: 1; }

.contact-label,
.hardware-contact-label {
    font-size: 0.6875rem;
    color: var(--stone-400) !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.contact-value,
.hardware-contact-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--stone-900) !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: var(--stone-900) !important;
    background-clip: unset !important;
}

/* Footer */
.landing-footer,
.hardware-footer {
    background: var(--stone-950) !important;
    color: white;
    padding: 3rem 0 2rem;
    position: relative;
}

.landing-footer::before { display: none; }

.footer-content,
.hardware-footer-content { text-align: center; }

.footer-logo,
.hardware-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    -webkit-text-fill-color: white !important;
    background-clip: unset !important;
    letter-spacing: -0.02em;
}

.footer-logo i,
.hardware-footer-logo i {
    color: var(--accent-mid) !important;
    background: none !important;
    -webkit-text-fill-color: var(--accent-mid) !important;
    background-clip: unset !important;
    font-size: 1.75rem;
    animation: none !important;
}

.footer-text,
.hardware-footer-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--stone-900) !important;
    background-size: unset !important;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1.125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md) !important;
    transition: all var(--duration-normal) var(--ease-out);
    z-index: 1000;
    animation: none !important;
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
}

.scroll-to-top[style*="display: flex"] {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.scroll-to-top i { transition: transform 0.2s var(--ease-out); }
.scroll-to-top:hover i { transform: translateY(-2px); }

/* Landing Responsive — Mobile-First */
/* Base (mobile): single column, compact */
.features-grid, .hardware-features-grid { grid-template-columns: 1fr; padding: 0 1rem; }
.nav-content { padding: 0 1rem; }
.logo-section, .hardware-logo { font-size: 1.25rem; }
.logo-section i, .hardware-logo i { font-size: 1.5rem; }
.btn-login-nav, .hardware-btn { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.hero-title, .hardware-title { font-size: clamp(2rem, 8vw, 2.75rem); }
.hero-cta, .hardware-cta { flex-direction: column; gap: 0.75rem; }
.btn-hero-primary, .btn-hero-secondary,
.hardware-primary-btn, .hardware-secondary-btn { width: 100%; justify-content: center; }
.hero-stats, .hardware-stats { flex-direction: column; gap: 1rem; }
.stat-item, .hardware-stat { min-width: 100%; }
.section-title, .hardware-section-title { font-size: 1.75rem; }
.contact-card, .hardware-contact-card { padding: 2rem 1.25rem; }
.contact-info, .hardware-contact-info { grid-template-columns: 1fr; }
.scroll-to-top { width: 40px; height: 40px; bottom: 16px; right: 16px; }

@media (min-width: 768px) {
    .nav-content { padding: 0 2rem; }
    .logo-section, .hardware-logo { font-size: 1.5rem; }
    .logo-section i, .hardware-logo i { font-size: 1.75rem; }
    .btn-login-nav, .hardware-btn { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
    .hero-title, .hardware-title { font-size: clamp(2.5rem, 5vw, 3.5rem); }
    .hero-cta, .hardware-cta { flex-direction: row; }
    .btn-hero-primary, .btn-hero-secondary,
    .hardware-primary-btn, .hardware-secondary-btn { width: auto; }
    .hero-stats, .hardware-stats { flex-direction: row; gap: 2rem; }
    .stat-item, .hardware-stat { min-width: auto; }
    .features-grid, .hardware-features-grid { grid-template-columns: repeat(2, 1fr); padding: 0 2rem; }
    .section-title, .hardware-section-title { font-size: 2rem; }
    .contact-card, .hardware-contact-card { padding: 3rem 2rem; }
    .contact-info, .hardware-contact-info { grid-template-columns: repeat(2, 1fr); }
    .scroll-to-top { width: 48px; height: 48px; bottom: 24px; right: 24px; }
}

@media (min-width: 992px) {
    .features-grid, .hardware-features-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ============================================
   ADMIN PANEL STYLES
   ============================================ */
.landing-page-admin {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
    overflow: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: white;
    border-bottom: 1px solid var(--stone-200);
    flex-shrink: 0;
}

.admin-header h3 { margin: 0; font-size: 1.1rem; }

.tab-content-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    background: var(--stone-50);
    min-height: 0;
}

.tab-pane {
    background: white;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width { grid-column: 1 / -1; }

.section-divider { height: 1px; background: var(--stone-200); margin: 0.75rem 0; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.landing-page-admin .tab-pane.active .cards-grid {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    max-height: 100%;
    padding-right: 0.5rem;
    align-content: start;
}

.card-item {
    background: var(--stone-50);
    border: 1px solid var(--stone-200);
    border-radius: var(--radius-xs);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-header-small {
    background: var(--stone-100);
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--stone-600);
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header-small .btn-sm { font-size: 0.65rem; padding: 0.15rem 0.35rem; line-height: 1.2; }
.card-header-small .btn-outline-danger { border-color: var(--color-error); color: var(--color-error); }
.card-header-small .btn-outline-danger:hover { background-color: var(--color-error); border-color: var(--color-error); color: white; }

.card-body-small { padding: 0.5rem; overflow: visible; flex: 1; }
.card-body-small .form-group { margin-bottom: 0.4rem; }
.card-body-small .form-label { font-size: 0.7rem; margin-bottom: 0.2rem; }
.card-body-small .form-control-sm { font-size: 0.8rem; padding: 0.25rem 0.4rem; }
.card-body-small textarea.form-control-sm { min-height: 45px; resize: vertical; }

.img-preview {
    max-width: 100%;
    max-height: 100px;
    height: auto;
    border-radius: 4px;
    border: 1px solid var(--stone-200);
    object-fit: contain;
    background: white;
    margin-top: 0.3rem;
}

.landing-page-admin .input-group { display: flex; gap: 0.25rem; }
.landing-page-admin .input-group .form-control { flex: 1; }
.landing-page-admin .input-group .btn { flex-shrink: 0; padding: 0.25rem 0.4rem; font-size: 0.75rem; border-radius: 4px; }
.landing-page-admin .input-group .btn:hover { background-color: var(--color-error); border-color: var(--color-error); color: white; }

.upload-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    color: #0066cc;
    font-size: 0.7rem;
    font-weight: 500;
}

.upload-status i { animation: spin 1s linear infinite; }

.upload-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #ffe6e6;
    border: 1px solid #ffb3b3;
    border-radius: 4px;
    color: #cc0000;
    font-size: 0.7rem;
    font-weight: 500;
}

.gallery-section-header { margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--stone-200); }

.admin-footer {
    padding: 0.75rem 1rem;
    background: white;
    border-top: 1px solid var(--stone-200);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.icon-selector-wrapper { width: 100%; }
.icon-selector-wrapper .input-group-text { background: var(--stone-50); border-right: none; min-width: 35px; justify-content: center; font-size: 0.9rem; padding: 0.25rem 0.4rem; }
.icon-selector-wrapper .input-group .btn { padding: 0.25rem 0.4rem; font-size: 0.75rem; }
.icon-selector-wrapper small { font-size: 0.65rem; display: block; }

/* Admin grid — mobile-first: single column base, expand on larger */
.form-grid { grid-template-columns: 1fr; }
.cards-grid { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .form-grid { grid-template-columns: repeat(3, 1fr); }
}

.landing-page-admin .tab-pane.active .cards-grid::-webkit-scrollbar { width: 8px; }
.landing-page-admin .tab-pane.active .cards-grid::-webkit-scrollbar-track { background: var(--stone-50); border-radius: 4px; }
.landing-page-admin .tab-pane.active .cards-grid::-webkit-scrollbar-thumb { background: var(--stone-300); border-radius: 4px; }
.landing-page-admin .tab-pane.active .cards-grid::-webkit-scrollbar-thumb:hover { background: var(--stone-400); }

/* ============================================
   375px KÜCÜK TELEFON DESTEĞİ (iPhone SE/8)
   ============================================ */
@media (max-width: 480px) {
    /* Detail sayfa kompakt */
    .detail-page .info-card {
        margin-bottom: 0.5rem;
    }

    .detail-page .data-card > .card-body {
        padding: 0.5rem;
    }

    /* List sayfa DataTable padding */
    .list-page .dataTables_info,
    .list-page .dataTables_paginate,
    .list-page .dataTables_length,
    .list-page .dataTables_filter {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Pagination butonları küçült */
    .dataTables_paginate .paginate_button {
        padding: 0.2rem 0.375rem !important;
        font-size: 0.6875rem !important;
        margin: 0 1px !important;
    }

    .list-page .dataTables_paginate {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px;
    }

    /* Page toolbar stack */
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    /* Fit page düzenleri */
    .fit-page > .row {
        flex-direction: column;
    }

    .fit-page > .row > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Tablo genel responsive */
    .table thead th {
        font-size: 0.6875rem;
        padding: 0.375rem 0.25rem;
        white-space: nowrap;
    }

    .table tbody td {
        font-size: 0.6875rem;
        padding: 0.375rem 0.25rem;
    }

    /* Settings satır düzeni */
    .settings-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .settings-label {
        flex: none;
        width: 100%;
    }

    .settings-input {
        flex: none;
        width: 100%;
    }

    /* Form grid tek sütun */
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* Genel metin taşma koruması */
    .text-truncate-mobile {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}
