﻿/* DRANKCUP PROFESSIONAL UI THEME */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");
@import url("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css");

:root {
    color-scheme: dark;

    /* Core surfaces */
    --bg-deep: #0a1118;
    --bg-surface: rgba(13, 22, 31, 0.84);
    --bg-card: rgba(17, 27, 38, 0.84);
    --bg-card-hover: rgba(23, 34, 47, 0.92);
    --bg-field: rgba(8, 15, 23, 0.8);

    /* Accent system */
    --accent-primary: #3b8dff;
    --accent-primary-strong: #246ad0;
    --accent-glow: rgba(59, 141, 255, 0.3);
    --accent-success: #35b977;
    --accent-warning: #d9a538;
    --accent-orange: #d9a538;
    --accent-danger: #e04e4e;
    --accent-purple: #726ee6;

    /* Text */
    --text-primary: #eaf1fb;
    --text-secondary: rgba(206, 220, 236, 0.78);
    --text-tertiary: rgba(171, 191, 213, 0.56);
    --text-sec: rgba(206, 220, 236, 0.78);

    /* Borders and effects */
    --glass-border: 1px solid rgba(138, 165, 192, 0.22);
    --glass-blur: blur(14px);
    --shadow-soft: 0 8px 24px rgba(2, 8, 15, 0.26);
    --shadow-focus: 0 0 0 3px rgba(59, 141, 255, 0.22);

    /* Radius */
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

[data-theme="light"] {
    color-scheme: light;

    /* Core surfaces */
    --bg-deep: #eff3f8;
    --bg-surface: rgba(255, 255, 255, 0.9);
    --bg-card: rgba(255, 255, 255, 0.92);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-field: rgba(255, 255, 255, 0.96);

    /* Accent system */
    --accent-primary: #2f87f6;
    --accent-primary-strong: #1765cb;
    --accent-glow: rgba(47, 135, 246, 0.22);
    --accent-success: #20955a;
    --accent-warning: #c98910;
    --accent-orange: #c98910;
    --accent-danger: #cc3c3c;
    --accent-purple: #645dd6;

    /* Text */
    --text-primary: #0f2032;
    --text-secondary: rgba(28, 48, 70, 0.82);
    --text-tertiary: rgba(53, 76, 102, 0.62);
    --text-sec: rgba(28, 48, 70, 0.82);

    /* Borders and effects */
    --glass-border: 1px solid rgba(136, 163, 192, 0.32);
    --glass-blur: blur(10px);
    --shadow-soft: 0 8px 20px rgba(31, 52, 74, 0.12);
    --shadow-focus: 0 0 0 4px rgba(47, 135, 246, 0.22);
}

/* Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: none;
}

html,
body {
    width: 100%;
}

body {
    position: relative;
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 8% 10%, rgba(59, 141, 255, 0.1) 0%, transparent 38%),
        radial-gradient(circle at 92% 92%, rgba(114, 110, 230, 0.06) 0%, transparent 34%),
        linear-gradient(155deg, #09131d 0%, #08111a 48%, #0a1622 100%);
    color: var(--text-primary);
    font-family: "Manrope", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.008) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.008) 1px, transparent 1px);
    background-size: 36px 36px;
    opacity: 0.24;
    z-index: -1;
}

[data-theme="light"] body {
    background-color: var(--bg-deep);
    background-image:
        radial-gradient(circle at 10% 8%, rgba(59, 141, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 85% 90%, rgba(100, 93, 214, 0.06) 0%, transparent 36%),
        linear-gradient(160deg, #f0f4f8 0%, #ecf2f8 42%, #f7fafd 100%);
}

[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(25, 53, 82, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(25, 53, 82, 0.035) 1px, transparent 1px);
    opacity: 0.15;
}

a {
    color: inherit;
}

/* Scrollbars */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(101, 132, 164, 0.45) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: rgba(101, 132, 164, 0.45);
    border-radius: 99px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(133, 166, 199, 0.65);
}

/* App grid */
.app-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    height: 100vh;
    max-width: 2100px;
    margin: 0 auto;
    gap: 0;
}

/* Sidebar */
.sidebar {
    background: linear-gradient(180deg, rgba(10, 18, 27, 0.92) 0%, rgba(9, 16, 24, 0.96) 100%);
    border-right: var(--glass-border);
    backdrop-filter: blur(14px) saturate(118%);
    -webkit-backdrop-filter: blur(14px) saturate(118%);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    overflow-y: auto;
    height: 100vh;
    box-shadow: inset -1px 0 0 rgba(173, 196, 222, 0.08), 0 0 0 1px rgba(11, 22, 34, 0.3);
}

.logo-area {
    margin-bottom: 24px;
    padding: 0 8px;
}

.logo-area--sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 78px;
}

.app-logo {
    display: block;
    max-width: 100%;
}

.app-logo--sidebar {
    width: 164px;
    filter: drop-shadow(0 0 14px var(--accent-glow));
}

.logo-text {
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 1.48rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    font-weight: 650;
    font-size: 0.9rem;
}

.nav-item i {
    width: 24px;
    text-align: center;
    font-size: 1rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(59, 141, 255, 0.14);
    border-color: rgba(77, 151, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(47, 135, 246, 0.07);
    transform: translateX(2px);
}

.nav-item:hover i {
    color: var(--accent-primary);
    transform: scale(1.07);
}

.nav-item.active {
    color: #edf5ff;
    background: linear-gradient(135deg, rgba(59, 141, 255, 0.2) 0%, rgba(36, 106, 208, 0.22) 100%);
    border-color: rgba(104, 168, 245, 0.48);
    box-shadow: 0 8px 20px rgba(14, 58, 117, 0.22);
}

.nav-item--danger {
    color: #ff9090;
    width: 100%;
    background: transparent;
    border: 0;
    font: inherit;
    text-align: left;
}

.nav-item--danger:hover {
    color: #ffd0d0;
    background: rgba(224, 78, 78, 0.14);
    border: 1px solid rgba(224, 78, 78, 0.3);
}

.sidebar-spacer {
    flex-grow: 1;
}

.sidebar-separator {
    border-top: 1px solid rgba(154, 180, 209, 0.22);
    margin: 8px 2px;
}

.sidebar-bottom-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-logout-form {
    margin: 0;
}

.nav-item--theme {
    width: 100%;
    background: transparent;
    justify-content: flex-start;
}

/* Main content */
.main-content {
    overflow-y: auto;
    padding: 34px 34px 90px;
}

.page-header {
    margin-bottom: 20px;
    animation: fadeSlideDown 0.55s ease-out both;
}

h1 {
    font-family: "Sora", "Manrope", sans-serif;
    font-size: clamp(2rem, 2.7vw, 2.55rem);
    font-weight: 750;
    letter-spacing: -0.03em;
    margin-top: 2px;
    color: var(--text-primary);
    line-height: 1.1;
}

h2,
h3 {
    font-family: "Sora", "Manrope", sans-serif;
    letter-spacing: -0.01em;
}

.subtitle {
    color: #8bbbf7;
    font-weight: 750;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

[data-theme="light"] .subtitle {
    color: #5e95d9;
}

/* Cards */
.card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(18, 30, 42, 0.82) 0%, rgba(13, 22, 33, 0.9) 100%);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: var(--glass-blur) saturate(115%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(115%);
    padding: 22px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.045) 0%, transparent 46%);
    opacity: 0.45;
}

.card:hover {
    transform: translateY(-1px);
    background: linear-gradient(165deg, rgba(22, 35, 49, 0.92) 0%, rgba(16, 26, 38, 0.94) 100%);
    border-color: rgba(141, 173, 208, 0.34);
    box-shadow: 0 12px 28px rgba(2, 8, 15, 0.32);
}

.card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.card-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
}

.card-link:hover .card {
    border-color: rgba(123, 174, 244, 0.46);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.no-print {
    display: inherit;
}

/* Buttons */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    border: 1px solid rgba(113, 165, 232, 0.28);
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-primary-strong) 100%);
    color: #f9fcff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 750;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(13, 73, 150, 0.28);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn-premium:hover {
    transform: translateY(-1px);
    filter: brightness(1.03);
    box-shadow: 0 12px 22px rgba(13, 73, 150, 0.34);
}

.btn-premium:active {
    transform: translateY(0);
}

.btn-premium:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.btn-secondary {
    background: rgba(167, 197, 230, 0.12);
    border-color: rgba(167, 197, 230, 0.24);
    color: #e9f2ff;
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(167, 197, 230, 0.2);
}

[data-theme="light"] .btn-secondary {
    background: rgba(47, 135, 246, 0.12);
    border-color: rgba(98, 163, 246, 0.42);
    color: #193a60;
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(47, 135, 246, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #f25757 0%, #d33232 100%);
    border-color: rgba(255, 138, 138, 0.24);
    box-shadow: 0 8px 16px rgba(160, 36, 36, 0.3);
}

.btn-danger:hover {
    box-shadow: 0 10px 18px rgba(160, 36, 36, 0.36);
}

.btn-outline {
    background: transparent;
    border-color: rgba(162, 191, 223, 0.35);
    color: #dbe9fa;
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(145, 184, 223, 0.14);
    border-color: rgba(162, 191, 223, 0.58);
}

[data-theme="light"] .btn-outline {
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(67, 112, 157, 0.35);
    color: #1f4268;
}

[data-theme="light"] .btn-outline:hover {
    background: rgba(47, 135, 246, 0.16);
    border-color: rgba(47, 135, 246, 0.5);
    color: #14395f;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(150, 186, 226, 0.28);
    background: rgba(146, 180, 218, 0.12);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.theme-toggle i {
    color: var(--accent-primary);
}

.theme-toggle:hover {
    background: rgba(47, 135, 246, 0.15);
    border-color: rgba(98, 163, 246, 0.56);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.theme-toggle--compact {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.78rem;
}

.theme-toggle--compact .theme-toggle-label {
    white-space: nowrap;
}

.nav-item.theme-toggle {
    justify-content: flex-start;
}

.app-flash-stack {
    gap: 8px;
    margin-bottom: 16px;
}

.app-flash-item {
    display: flex;
    width: 100%;
    border-radius: 12px;
    padding: 10px 14px;
    justify-content: flex-start;
    gap: 10px;
    word-break: break-word;
    border-width: 1px;
}

.language-switch-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 4px 0 10px;
    padding: 2px 2px 0;
}

.language-switch-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.language-switch-select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(152, 178, 209, 0.25);
    background: rgba(14, 26, 38, 0.75);
    color: var(--text-primary);
    padding: 8px 11px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

[data-theme="light"] .language-switch-select {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(128, 161, 195, 0.42);
}

[dir="rtl"] body {
    direction: rtl;
}

[dir="rtl"] .nav-item {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .nav-item:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .main-content {
    text-align: right;
}

[dir="rtl"] .language-switch-form,
[dir="rtl"] .input-group,
[dir="rtl"] .card {
    text-align: right;
}

[data-theme="light"] .theme-toggle {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(128, 161, 195, 0.42);
    color: var(--text-secondary);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(47, 135, 246, 0.12);
    border-color: rgba(98, 163, 246, 0.58);
}

/* Forms */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

label {
    margin-left: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.input-label {
    margin-left: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

input,
select,
textarea {
    width: 100%;
    background: var(--bg-field);
    border: 1px solid rgba(152, 178, 209, 0.2);
    border-radius: 12px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: rgba(196, 213, 232, 0.55);
}

select option {
    background: #0f1a26;
    color: var(--text-primary);
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(12, 21, 32, 0.88);
    border-color: rgba(95, 160, 242, 0.8);
    box-shadow: var(--shadow-focus);
}

input[type="month"],
input[type="date"] {
    min-height: 34px;
    color-scheme: dark;
}

input[type="month"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
    filter: brightness(0) invert(1) opacity(0.78);
    background: transparent;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}

/* Page header + compact filter bars */
.page-header {
    margin-bottom: 8px;
}

.filter-toolbar {
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 10px 0 6px;
}

.filter-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select,
.filter-form textarea {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.82rem;
    border-radius: 11px;
}

.filter-form input[type="text"] {
    min-width: 210px;
}

.filter-form select {
    width: auto;
    min-width: 130px;
}

.filter-form .btn-premium {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.76rem;
    border-radius: 11px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 130px;
}

.filter-label {
    font-size: 0.64rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
    line-height: 1;
    padding-left: 2px;
}

.filter-focus-target {
    scroll-margin-top: 90px;
}

.filter-field input,
.filter-field select {
    width: 100%;
    min-width: 0;
}

.filter-stat {
    text-align: right;
    border-left: var(--glass-border);
    padding-left: 12px;
}

/* Compact filter controls (all GET forms in main content) */
.main-content form[method="GET"],
.main-content form[method="get"] {
    gap: 8px !important;
    row-gap: 8px !important;
}

.main-content form[method="GET"] input,
.main-content form[method="GET"] select,
.main-content form[method="GET"] textarea,
.main-content form[method="get"] input,
.main-content form[method="get"] select,
.main-content form[method="get"] textarea {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 11px;
}

.main-content form[method="GET"] input[type="month"],
.main-content form[method="GET"] input[type="date"],
.main-content form[method="get"] input[type="month"],
.main-content form[method="get"] input[type="date"] {
    min-height: 34px;
}

.main-content form[method="GET"] .btn-premium,
.main-content form[method="get"] .btn-premium {
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.76rem;
    border-radius: 11px;
}

/* Search */
.search-container {
    background: rgba(145, 182, 221, 0.09);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(162, 191, 223, 0.2);
    margin-bottom: 25px;
}

.search-container i {
    color: rgba(177, 203, 232, 0.72);
}

.search-input {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1rem;
    min-width: 0;
}

.search-input:focus {
    box-shadow: none;
    border-color: transparent;
    background: transparent;
}

/* Status pills and badges */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

[data-theme="light"] .status-pill {
    border-color: rgba(67, 112, 157, 0.28);
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bg-green,
.bg-success {
    background: rgba(47, 191, 113, 0.18);
    color: #79e0a8;
    border-color: rgba(99, 224, 155, 0.34);
}

.bg-orange {
    background: rgba(242, 181, 55, 0.18);
    color: #ffd583;
    border-color: rgba(242, 181, 55, 0.36);
}

.bg-red,
.bg-danger {
    background: rgba(239, 74, 74, 0.2);
    color: #ff9292;
    border-color: rgba(243, 120, 120, 0.35);
}

[data-theme="light"] .bg-green,
[data-theme="light"] .bg-success {
    background: rgba(32, 149, 90, 0.16);
    color: #18633f;
    border-color: rgba(32, 149, 90, 0.36);
}

[data-theme="light"] .bg-orange {
    background: rgba(201, 137, 16, 0.16);
    color: #7c4f00;
    border-color: rgba(201, 137, 16, 0.34);
}

[data-theme="light"] .bg-red,
[data-theme="light"] .bg-danger {
    background: rgba(204, 60, 60, 0.14);
    color: #8f2222;
    border-color: rgba(204, 60, 60, 0.33);
}

.bg-white {
    background: rgba(193, 214, 238, 0.14);
    color: #eaf2ff;
    border-color: rgba(193, 214, 238, 0.25);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid rgba(160, 188, 218, 0.25);
    background: rgba(160, 188, 218, 0.13);
}

/* Tables */
.premium-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.premium-table th {
    text-align: left;
    padding: 0 16px 10px;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-weight: 700;
}

.premium-table tr {
    transition: transform 0.22s ease;
}

.premium-table td {
    background: rgba(18, 30, 42, 0.78);
    padding: 16px;
    border-top: 1px solid rgba(158, 186, 217, 0.14);
    border-bottom: 1px solid rgba(158, 186, 217, 0.14);
}

.premium-table td:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-left: 1px solid rgba(158, 186, 217, 0.14);
}

.premium-table td:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    border-right: 1px solid rgba(158, 186, 217, 0.14);
}

.premium-table tr:hover {
    transform: scale(1.002);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: inherit;
}

.row-danger td {
    background: rgba(239, 74, 74, 0.12) !important;
    border-top: 1px solid rgba(248, 140, 140, 0.28) !important;
    border-bottom: 1px solid rgba(248, 140, 140, 0.28) !important;
}

/* Carousel */
.horizontal-carousel {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 20px 0;
    margin-bottom: 30px;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.horizontal-carousel::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 auto;
    width: 140px;
    text-align: center;
    padding: 15px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(163, 193, 225, 0.18);
    background: rgba(148, 183, 222, 0.08);
    transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.carousel-item:hover {
    transform: translateY(-4px);
    border-color: rgba(111, 172, 245, 0.45);
    background: rgba(148, 183, 222, 0.14);
}

.carousel-item i {
    font-size: 1.45rem;
    margin-bottom: 10px;
    color: var(--accent-primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(3, 8, 14, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    width: 420px;
    max-width: 90%;
    padding: 30px;
    text-align: center;
    border-radius: 24px;
    border: 1px solid rgba(161, 190, 222, 0.22);
    background: linear-gradient(165deg, rgba(14, 24, 36, 0.97) 0%, rgba(11, 20, 30, 0.98) 100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    animation: modalScale 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Slightly above center (desktop/laptop); mobile override below. */
    margin-top: -64px;
}

.modal-title {
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #f4f8ff;
}

.modal-text {
    color: var(--text-secondary);
    font-size: 0.94rem;
    margin-bottom: 25px;
    line-height: 1.6;
    white-space: pre-line;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions button,
.modal-actions a {
    flex: 1;
}

/* Mobile nav */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(167, 196, 229, 0.28);
    background: rgba(9, 16, 24, 0.9);
    color: #f3f8ff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1301;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mobile-menu-btn:hover,
.mobile-menu-btn.active {
    background: rgba(47, 135, 246, 0.24);
    border-color: rgba(112, 173, 245, 0.52);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(3, 8, 14, 0.66);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Animations */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        /* Avoid leaving a transform on the container (breaks fixed-position modals in scrollable layouts). */
        transform: none;
    }
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        /* Avoid leaving a transform on the container (breaks fixed-position modals in scrollable layouts). */
        transform: none;
    }
}

@keyframes floatingLogo {
    0% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 0 10px var(--accent-glow));
    }

    50% {
        transform: translateY(-8px) rotate(1.5deg);
        filter: drop-shadow(0 0 20px var(--accent-glow));
    }

    100% {
        transform: translateY(0) rotate(0deg);
        filter: drop-shadow(0 0 10px var(--accent-glow));
    }
}

@keyframes pulseSoft {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.62;
    }
}

@keyframes shakeAlert {
    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

@keyframes modalScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animated-logo {
    animation: floatingLogo 4s ease-in-out infinite;
}

[data-theme="light"] .animated-logo {
    filter: drop-shadow(0 0 8px rgba(47, 135, 246, 0.18)) brightness(0.38) contrast(1.24) saturate(1.2) !important;
    opacity: 0.98;
}

.animate-fade-in {
    animation: fadeSlideIn 0.45s ease-out both;
}

.animate-pulse {
    animation: pulseSoft 1.7s ease-in-out infinite;
}

.animate-shake {
    animation: shakeAlert 0.35s ease-in-out 2;
}

/* Text and utility classes */
.text-sec {
    color: var(--text-secondary);
}

.text-xs {
    font-size: 0.75rem;
}

.text-tertiary {
    color: var(--text-tertiary);
}

[data-theme="light"] .text-tertiary {
    color: rgba(37, 63, 90, 0.72);
}

.text-danger {
    color: var(--accent-danger);
}

.text-success,
.text-green {
    color: var(--accent-success);
}

.text-red {
    color: var(--accent-danger);
}

.text-white {
    color: var(--text-primary);
}

.text-danger-glow {
    color: #ff9d9d;
    text-shadow: 0 0 14px rgba(239, 74, 74, 0.44);
    font-weight: 800;
}

.font-bold {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.uppercase {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.space-y {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.w-full {
    width: 100%;
}

.hidden {
    display: none !important;
}

/* Global loading progress */
.loading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 5000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.loading-progress.is-visible {
    opacity: 1;
}

.loading-progress__bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #46a0ff 0%, #62beff 42%, #8fd7ff 100%);
    box-shadow: 0 0 14px rgba(71, 159, 246, 0.6);
    transition: width 0.2s ease;
}

body.is-loading {
    cursor: progress;
}

.btn-premium.is-pending {
    opacity: 0.75;
    pointer-events: none;
}

.btn-spinner {
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.32);
    border-top-color: rgba(255, 255, 255, 0.98);
    animation: spinProgress 0.7s linear infinite;
}

@keyframes spinProgress {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ERP section consistency */
.erp-shell {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-header--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 14px;
}

.page-header__meta {
    text-align: right;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-header__meta strong {
    color: var(--text-primary);
    font-size: 1.12rem;
    font-weight: 700;
}

.dashboard-alert {
    margin-bottom: 16px;
    border: 1px solid rgba(224, 78, 78, 0.32);
    background: rgba(224, 78, 78, 0.08);
    padding: 12px 14px;
    border-radius: 14px;
}

.dashboard-alert__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-alert__left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.dashboard-alert__icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent-danger);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-alert__title {
    font-weight: 750;
    color: #ff9999;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.dashboard-alert__text {
    font-size: 0.77rem;
    color: var(--text-secondary);
}

.dashboard-alert__text strong {
    color: var(--text-primary);
    font-weight: 700;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 148px;
    border-left: 3px solid transparent;
}

.kpi-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.kpi-card__label {
    font-size: 0.68rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    font-weight: 800;
}

.kpi-card__value {
    font-size: 1.9rem;
    line-height: 1;
    font-weight: 800;
}

.kpi-card__unit {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.kpi-card__hint {
    margin-top: auto;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.kpi-card--primary { border-left-color: var(--accent-primary); }
.kpi-card--success { border-left-color: var(--accent-success); }
.kpi-card--danger { border-left-color: var(--accent-danger); }
.kpi-card--purple { border-left-color: var(--accent-purple); }

.kpi-card--danger .kpi-card__value { color: var(--accent-danger); }

.card-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.list-row-soft {
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(159, 188, 219, 0.1);
}

.config-tabs {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    padding: 5px;
    border-radius: 14px;
    border: var(--glass-border);
    flex-wrap: wrap;
}

.config-top-actions {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.config-table-shell {
    padding: 0;
    overflow: hidden;
}

.compact-inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.compact-inline-form input,
.compact-inline-form select {
    padding: 7px 9px;
    min-height: 34px;
    font-size: 0.78rem;
    border-radius: 10px;
}

.compact-inline-form .btn-premium {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 0.72rem;
}

.section-note {
    font-size: 0.76rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.erp-block {
    padding: 20px 22px;
    border-radius: 18px;
    border: var(--glass-border);
    background: linear-gradient(168deg, rgba(18, 30, 42, 0.84) 0%, rgba(13, 23, 34, 0.9) 100%);
    box-shadow: var(--shadow-soft);
}

.erp-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.erp-block-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.erp-block-subtitle {
    font-size: 0.77rem;
    color: var(--text-tertiary);
}

.kpi-grid-tight {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

/* Local skeletons for heavy sections */
.section-loading-shell {
    position: relative;
}

.section-loading-shell [data-loading-skeleton] {
    display: none;
}

.section-loading-shell.is-loading [data-loading-skeleton] {
    display: block;
}

.section-loading-shell.is-loading [data-loading-content] {
    opacity: 0.28;
    pointer-events: none;
}

.skeleton-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-line,
.skeleton-box,
.skeleton-pill {
    position: relative;
    overflow: hidden;
    background: rgba(163, 191, 224, 0.12);
    border: 1px solid rgba(172, 196, 222, 0.2);
    border-radius: 12px;
}

.skeleton-line::after,
.skeleton-box::after,
.skeleton-pill::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.16) 48%, transparent 100%);
    animation: skeletonShift 1.2s ease-in-out infinite;
}

.skeleton-line {
    height: 12px;
}

.skeleton-box {
    height: 130px;
}

.skeleton-pill {
    height: 32px;
    border-radius: 999px;
}

.skeleton-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.skeleton-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.chart-shell {
    min-height: 260px;
}

.chart-shell.is-chart-loading canvas {
    visibility: hidden;
}

.chart-shell .chart-skeleton {
    display: none;
}

.chart-shell.is-chart-loading .chart-skeleton {
    display: block;
}

@keyframes skeletonShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(190%); }
}

[data-theme="light"] .erp-block {
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 251, 255, 0.98) 100%);
}

[data-theme="light"] .skeleton-line,
[data-theme="light"] .skeleton-box,
[data-theme="light"] .skeleton-pill {
    background: rgba(56, 98, 141, 0.12);
    border-color: rgba(56, 98, 141, 0.2);
}

[data-theme="light"] .skeleton-line::after,
[data-theme="light"] .skeleton-box::after,
[data-theme="light"] .skeleton-pill::after {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.72) 48%, transparent 100%);
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(247, 252, 255, 0.94) 100%);
    border-right: var(--glass-border);
    box-shadow: inset -1px 0 0 rgba(131, 164, 198, 0.18);
}

[data-theme="light"] .nav-item {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-item:hover {
    color: var(--text-primary);
    background: rgba(47, 135, 246, 0.11);
    border-color: rgba(98, 163, 246, 0.4);
    box-shadow: inset 0 0 0 1px rgba(47, 135, 246, 0.08);
}

[data-theme="light"] .nav-item.active {
    color: #0f2238;
    background: linear-gradient(135deg, rgba(47, 135, 246, 0.2) 0%, rgba(23, 101, 203, 0.18) 100%);
    border-color: rgba(98, 163, 246, 0.5);
    box-shadow: 0 8px 22px rgba(25, 83, 154, 0.2);
}

[data-theme="light"] .nav-item--danger {
    color: #b63131;
}

[data-theme="light"] .nav-item--danger:hover {
    color: #8f2323;
    background: rgba(204, 60, 60, 0.11);
    border-color: rgba(204, 60, 60, 0.24);
}

[data-theme="light"] .card {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 251, 255, 0.94) 100%);
    border-color: rgba(133, 160, 189, 0.34);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .card::before {
    background: linear-gradient(135deg, rgba(40, 71, 104, 0.06) 0%, transparent 42%);
}

[data-theme="light"] .card:hover {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 255, 0.98) 100%);
    border-color: rgba(111, 144, 176, 0.42);
    box-shadow: 0 18px 30px rgba(36, 59, 83, 0.16);
}

[data-theme="light"] .dashboard-alert {
    border-color: rgba(204, 60, 60, 0.28);
    background: rgba(204, 60, 60, 0.08);
}

[data-theme="light"] .dashboard-alert__title {
    color: #9f2f2f;
}

[data-theme="light"] .list-row-soft {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(125, 157, 191, 0.26);
}

[data-theme="light"] .config-tabs {
    background: rgba(255, 255, 255, 0.76);
}

[data-theme="light"] .search-container {
    background: rgba(255, 255, 255, 0.84);
    border-color: rgba(140, 170, 201, 0.3);
}

[data-theme="light"] .search-container i {
    color: rgba(62, 92, 124, 0.72);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(133, 162, 194, 0.34);
    color: var(--text-primary);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
    color: rgba(77, 105, 134, 0.64);
}

[data-theme="light"] select option {
    background: #f7fbff;
    color: var(--text-primary);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
    background: #ffffff;
    border-color: rgba(47, 135, 246, 0.8);
    box-shadow: var(--shadow-focus);
}

[data-theme="light"] input[type="month"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
    filter: none;
    opacity: 0.66;
    background: transparent !important;
    box-shadow: none;
}

[data-theme="light"] input[type="month"],
[data-theme="light"] input[type="date"] {
    color-scheme: light;
}

[data-theme="light"] .premium-table td {
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(133, 162, 194, 0.34);
    border-bottom: 1px solid rgba(133, 162, 194, 0.34);
}

[data-theme="light"] .premium-table td:first-child {
    border-left: 1px solid rgba(133, 162, 194, 0.34);
}

[data-theme="light"] .premium-table td:last-child {
    border-right: 1px solid rgba(133, 162, 194, 0.34);
}

[data-theme="light"] .bg-white {
    background: rgba(40, 86, 133, 0.12);
    color: #1d3b5d;
    border-color: rgba(56, 98, 141, 0.24);
}

[data-theme="light"] .badge {
    background: rgba(40, 86, 133, 0.12) !important;
    color: #1d3b5d !important;
    border-color: rgba(56, 98, 141, 0.24) !important;
}

[data-theme="light"] .modal-overlay {
    background: rgba(27, 44, 64, 0.36);
}

[data-theme="light"] .modal-content {
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.97) 0%, rgba(246, 250, 255, 0.98) 100%);
    border-color: rgba(133, 162, 194, 0.34);
    box-shadow: 0 25px 50px -12px rgba(31, 51, 73, 0.26);
}

[data-theme="light"] .agent-topbar {
    border-bottom: 1px solid rgba(133, 162, 194, 0.34);
    background: rgba(255, 255, 255, 0.82);
}

[data-theme="light"] input[style*="background"],
[data-theme="light"] select[style*="background"],
[data-theme="light"] textarea[style*="background"] {
    background: rgba(255, 255, 255, 0.96) !important;
    border-color: rgba(133, 162, 194, 0.34) !important;
    color: var(--text-primary) !important;
}

/* 2026 visual refresh overrides */
:root {
    --bg-deep: #0b1117;
    --bg-surface: rgba(13, 20, 28, 0.84);
    --bg-card: rgba(17, 25, 34, 0.9);
    --bg-card-hover: rgba(22, 32, 44, 0.96);
    --bg-field: rgba(9, 16, 24, 0.92);
    --surface-muted: rgba(118, 153, 190, 0.08);
    --surface-raised: rgba(255, 255, 255, 0.04);
    --accent-primary: #2f7cf0;
    --accent-primary-strong: #1d63cc;
    --accent-glow: rgba(47, 124, 240, 0.24);
    --accent-success: #2f9868;
    --accent-warning: #c78b1e;
    --accent-orange: #c78b1e;
    --accent-danger: #d14d4d;
    --accent-purple: #5c70d6;
    --text-primary: #e7eef7;
    --text-secondary: rgba(201, 214, 230, 0.78);
    --text-tertiary: rgba(154, 175, 198, 0.6);
    --text-sec: rgba(201, 214, 230, 0.78);
    --glass-border: 1px solid rgba(126, 151, 179, 0.22);
    --glass-blur: blur(16px);
    --shadow-soft: 0 16px 36px rgba(2, 9, 16, 0.22);
    --shadow-card: 0 20px 48px rgba(3, 10, 18, 0.18);
    --shadow-focus: 0 0 0 4px rgba(47, 124, 240, 0.18);
    --radius-xl: 28px;
    --content-width: 1520px;
}

[data-theme="light"] {
    --bg-deep: #f3f5f7;
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-card: rgba(255, 255, 255, 0.96);
    --bg-card-hover: rgba(255, 255, 255, 0.99);
    --bg-field: rgba(255, 255, 255, 0.98);
    --surface-muted: rgba(43, 81, 122, 0.06);
    --surface-raised: rgba(255, 255, 255, 0.8);
    --accent-primary: #256ed9;
    --accent-primary-strong: #1556b1;
    --accent-glow: rgba(37, 110, 217, 0.16);
    --accent-success: #248453;
    --accent-warning: #b37a12;
    --accent-orange: #b37a12;
    --accent-danger: #bd3f3f;
    --accent-purple: #5666cb;
    --text-primary: #172635;
    --text-secondary: rgba(38, 58, 78, 0.78);
    --text-tertiary: rgba(70, 93, 118, 0.62);
    --text-sec: rgba(38, 58, 78, 0.78);
    --glass-border: 1px solid rgba(127, 154, 182, 0.26);
    --glass-blur: blur(12px);
    --shadow-soft: 0 14px 28px rgba(29, 49, 70, 0.1);
    --shadow-card: 0 20px 42px rgba(32, 52, 75, 0.09);
    --shadow-focus: 0 0 0 4px rgba(37, 110, 217, 0.14);
}

body {
    background-image:
        radial-gradient(circle at 10% 8%, rgba(47, 124, 240, 0.12) 0%, transparent 34%),
        radial-gradient(circle at 88% 92%, rgba(92, 112, 214, 0.04) 0%, transparent 28%),
        linear-gradient(180deg, #0b1117 0%, #0d141d 42%, #111a25 100%);
}

body::before {
    background-size: 44px 44px;
    opacity: 0.14;
}

[data-theme="light"] body {
    background-image:
        radial-gradient(circle at 8% 8%, rgba(37, 110, 217, 0.08) 0%, transparent 32%),
        radial-gradient(circle at 92% 92%, rgba(86, 102, 203, 0.04) 0%, transparent 26%),
        linear-gradient(180deg, #f1f4f7 0%, #f6f8fb 52%, #eef2f7 100%);
}

[data-theme="light"] body::before {
    opacity: 0.08;
}

.app-container {
    grid-template-columns: 286px 1fr;
    max-width: none;
}

.sidebar {
    background: linear-gradient(180deg, rgba(11, 18, 25, 0.94) 0%, rgba(13, 20, 28, 0.98) 100%);
    padding: 24px 18px 20px;
    gap: 10px;
    box-shadow: inset -1px 0 0 rgba(173, 196, 222, 0.06), 0 0 0 1px rgba(11, 22, 34, 0.18);
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(246, 250, 255, 0.95) 100%);
    box-shadow: inset -1px 0 0 rgba(131, 164, 198, 0.14);
}

.logo-area {
    margin-bottom: 8px;
    padding: 0 6px;
}

.logo-area--sidebar {
    justify-content: flex-start;
    min-height: 68px;
}

.app-logo--sidebar {
    width: 156px;
    filter: drop-shadow(0 0 12px var(--accent-glow));
}

.sidebar-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
    padding: 0 8px;
}

.sidebar-brand__eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-primary);
}

.sidebar-brand__title {
    font-family: "Sora", "Manrope", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.sidebar-brand__text {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.nav-section-label {
    padding: 10px 12px 2px;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-tertiary);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.nav-item {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.88rem;
    background: rgba(255, 255, 255, 0.015);
}

.nav-item:hover {
    background: rgba(47, 124, 240, 0.12);
    border-color: rgba(88, 146, 233, 0.3);
    box-shadow: inset 0 0 0 1px rgba(47, 124, 240, 0.04);
    transform: translateX(1px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(47, 124, 240, 0.2) 0%, rgba(29, 99, 204, 0.2) 100%);
    border-color: rgba(100, 154, 232, 0.4);
    box-shadow: 0 10px 22px rgba(14, 58, 117, 0.16);
}

[data-theme="light"] .nav-item.active {
    color: #10263b;
    background: linear-gradient(135deg, rgba(37, 110, 217, 0.16) 0%, rgba(21, 86, 177, 0.14) 100%);
    border-color: rgba(87, 140, 213, 0.34);
    box-shadow: 0 10px 24px rgba(25, 83, 154, 0.12);
}

.sidebar-separator {
    border-top-color: rgba(154, 180, 209, 0.18);
    margin: 8px 4px;
}

.main-content {
    padding: 28px 30px 80px;
}

.main-content__inner {
    width: min(100%, var(--content-width));
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.page-header {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    padding: 24px 28px;
    border-radius: var(--radius-xl);
    border: var(--glass-border);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, transparent 54%),
        linear-gradient(180deg, rgba(18, 28, 39, 0.9) 0%, rgba(14, 22, 30, 0.94) 100%);
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 18px;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(47, 124, 240, 0.18), transparent 34%),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 35%);
}

[data-theme="light"] .page-header {
    background:
        linear-gradient(145deg, rgba(37, 110, 217, 0.08) 0%, transparent 54%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(247, 250, 255, 0.98) 100%);
}

[data-theme="light"] .page-header::before {
    background:
        radial-gradient(circle at top right, rgba(37, 110, 217, 0.12), transparent 34%),
        linear-gradient(90deg, rgba(20, 44, 70, 0.04), transparent 35%);
}

.page-header > * {
    position: relative;
    z-index: 1;
}

.subtitle {
    color: #8db4f4;
    font-size: 0.7rem;
    letter-spacing: 0.2em;
}

[data-theme="light"] .subtitle {
    color: #4f7fc4;
}

.card {
    background: linear-gradient(180deg, rgba(18, 27, 37, 0.92) 0%, rgba(15, 23, 32, 0.96) 100%);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.card:hover {
    background: linear-gradient(180deg, rgba(21, 31, 43, 0.94) 0%, rgba(17, 25, 34, 0.98) 100%);
    border-color: rgba(134, 163, 195, 0.3);
    box-shadow: 0 18px 34px rgba(2, 8, 15, 0.24);
}

[data-theme="light"] .card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.98) 100%);
    border-color: rgba(133, 160, 189, 0.24);
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .card:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(247, 250, 255, 1) 100%);
    border-color: rgba(111, 144, 176, 0.3);
    box-shadow: 0 18px 30px rgba(36, 59, 83, 0.12);
}

.card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-premium {
    border-radius: 13px;
    border-color: rgba(110, 156, 217, 0.26);
    box-shadow: 0 10px 20px rgba(13, 73, 150, 0.2);
}

.btn-premium:hover {
    box-shadow: 0 14px 24px rgba(13, 73, 150, 0.24);
}

.btn-secondary {
    background: rgba(167, 197, 230, 0.08);
    border-color: rgba(167, 197, 230, 0.18);
}

.btn-secondary:hover {
    background: rgba(167, 197, 230, 0.14);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(162, 191, 223, 0.24);
}

.btn-outline:hover {
    background: rgba(145, 184, 223, 0.1);
    border-color: rgba(162, 191, 223, 0.42);
}

input,
select,
textarea {
    border-color: rgba(133, 163, 195, 0.2);
    border-radius: 14px;
    padding: 12px 14px;
}

input:focus,
select:focus,
textarea:focus {
    background: rgba(12, 21, 32, 0.98);
    border-color: rgba(95, 160, 242, 0.72);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
    border-color: rgba(133, 162, 194, 0.24);
}

.filter-toolbar {
    gap: 12px;
    margin-bottom: 0;
    padding: 16px 18px;
    background: var(--bg-surface);
    border: var(--glass-border);
    border-radius: 20px;
    backdrop-filter: var(--glass-blur) saturate(112%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(112%);
    box-shadow: var(--shadow-soft);
}

.filter-form {
    gap: 10px;
}

.filter-form input[type="text"] {
    min-width: 220px;
}

.search-container {
    background: var(--bg-surface);
    border-radius: 20px;
    padding: 14px 18px;
    gap: 12px;
    border: var(--glass-border);
    margin-bottom: 0;
    box-shadow: var(--shadow-soft);
}

[data-theme="light"] .search-container {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(140, 170, 201, 0.24);
}

.status-pill {
    padding: 6px 10px;
}

.premium-table {
    border-spacing: 0 10px;
}

.premium-table th {
    padding: 0 18px 10px;
    letter-spacing: 0.14em;
    font-weight: 800;
}

.premium-table td {
    background: rgba(19, 30, 42, 0.84);
    padding: 18px;
    border-top: 1px solid rgba(158, 186, 217, 0.12);
    border-bottom: 1px solid rgba(158, 186, 217, 0.12);
}

.premium-table tr:hover {
    transform: translateY(-1px);
}

[data-theme="light"] .premium-table td {
    border-top: 1px solid rgba(133, 162, 194, 0.22);
    border-bottom: 1px solid rgba(133, 162, 194, 0.22);
}

.horizontal-carousel {
    gap: 14px;
    padding: 6px 2px;
    margin-bottom: 0;
}

.carousel-item {
    width: 156px;
    padding: 18px 16px;
    border-radius: 18px;
    border-color: rgba(163, 193, 225, 0.14);
    background: rgba(148, 183, 222, 0.05);
}

.animated-logo {
    animation: none;
}

.section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.section-title h2,
.section-title h3 {
    margin: 0;
}

.section-subtitle {
    font-size: 0.8rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-state {
    padding: 72px 24px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state i {
    display: block;
    margin-bottom: 14px;
    font-size: 2.4rem;
    opacity: 0.34;
}

.empty-state--compact {
    padding: 28px 18px;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border: var(--glass-border);
    border-radius: 18px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-soft);
}

.pager__meta {
    font-size: 0.76rem;
    color: var(--text-secondary);
}

.pager__controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 16px;
    border: var(--glass-border);
    background: rgba(255, 255, 255, 0.04);
}

.segmented-control__item {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.segmented-control__item.is-active,
.segmented-control__item:hover {
    background: rgba(47, 124, 240, 0.14);
    border-color: rgba(93, 149, 227, 0.28);
    color: var(--text-primary);
}

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
}

body.auth-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.auth-card {
    width: min(100%, 1040px);
    display: grid;
    grid-template-columns: minmax(300px, 1.05fr) minmax(320px, 0.95fr);
    gap: 26px;
    align-items: stretch;
}

.auth-brand,
.auth-panel {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    border: var(--glass-border);
    background: linear-gradient(180deg, rgba(18, 27, 37, 0.92) 0%, rgba(15, 23, 32, 0.97) 100%);
    box-shadow: var(--shadow-card);
}

.auth-brand {
    padding: 34px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 620px;
}

.auth-brand::before,
.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(47, 124, 240, 0.18), transparent 30%),
        linear-gradient(150deg, rgba(255, 255, 255, 0.04), transparent 44%);
}

.auth-brand > *,
.auth-panel > * {
    position: relative;
    z-index: 1;
}

.auth-brand__top {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.auth-brand__logo {
    width: 188px;
}

.auth-brand__copy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
}

.auth-brand__copy h1 {
    font-size: clamp(2.2rem, 3.2vw, 3.3rem);
}

.auth-brand__copy p {
    color: var(--text-secondary);
    font-size: 0.98rem;
    line-height: 1.7;
}

.auth-brand__points {
    display: grid;
    gap: 12px;
}

.auth-brand__point {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(145, 173, 204, 0.14);
}

.auth-brand__point i {
    color: var(--accent-primary);
    margin-top: 2px;
}

.auth-brand__point strong {
    display: block;
    margin-bottom: 4px;
}

.auth-brand__point span {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.auth-panel {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-topbar__group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-topbar .language-switch-select {
    min-width: 148px;
}

.auth-form-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 18px 12px 8px;
}

.auth-form-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

body.service-entry-page {
    height: auto;
    min-height: 100vh;
    overflow: auto;
}

.agent-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.agent-topbar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 24px;
    border-bottom: var(--glass-border);
    background: linear-gradient(180deg, rgba(12, 20, 29, 0.92) 0%, rgba(11, 18, 26, 0.9) 100%);
    backdrop-filter: blur(12px) saturate(118%);
    -webkit-backdrop-filter: blur(12px) saturate(118%);
}

.agent-content {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0 36px;
}

.agent-topbar .language-switch-select {
    min-width: 132px;
}

.mode-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.mode-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(142, 170, 201, 0.16);
    background: linear-gradient(180deg, rgba(18, 28, 39, 0.9) 0%, rgba(13, 21, 31, 0.96) 100%);
    color: var(--text-secondary);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
    user-select: none;
}

.mode-card:hover {
    color: var(--text-primary);
    border-color: rgba(106, 152, 214, 0.28);
    background: linear-gradient(180deg, rgba(21, 32, 45, 0.94) 0%, rgba(15, 24, 35, 0.98) 100%);
    transform: translateY(-1px);
}

.mode-card.active {
    color: var(--text-primary);
    border-color: rgba(74, 137, 226, 0.44);
    background: linear-gradient(180deg, rgba(26, 42, 60, 0.96) 0%, rgba(15, 28, 42, 0.98) 100%);
    box-shadow: 0 10px 24px rgba(6, 16, 29, 0.24);
}

.mode-card span {
    font-size: 0.96rem;
    font-weight: 750;
}

.product-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(142, 170, 201, 0.14);
    background: linear-gradient(180deg, rgba(18, 28, 39, 0.82) 0%, rgba(13, 21, 31, 0.9) 100%);
}

.product-row .btn-premium {
    min-height: 46px;
}

[data-theme="light"] .mode-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 249, 254, 0.98) 100%);
    border-color: rgba(133, 162, 194, 0.24);
}

[data-theme="light"] .mode-card:hover {
    border-color: rgba(93, 138, 196, 0.3);
}

[data-theme="light"] .mode-card.active {
    background: linear-gradient(180deg, rgba(241, 248, 255, 1) 0%, rgba(233, 243, 255, 1) 100%);
    border-color: rgba(74, 137, 226, 0.36);
    box-shadow: 0 14px 26px rgba(32, 52, 75, 0.12);
}

[data-theme="light"] .product-row {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 250, 255, 0.98) 100%);
    border-color: rgba(133, 162, 194, 0.18);
}

.auth-form-card p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 176, 206, 0.12);
}

.auth-footer__text {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.inventory-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.inventory-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.inventory-card__title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory-card__title strong {
    font-size: 1rem;
}

.inventory-card__code {
    font-size: 0.76rem;
    color: var(--text-tertiary);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.inventory-card__status {
    align-self: flex-start;
}

.inventory-card__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.inventory-card--critical {
    border-color: rgba(209, 77, 77, 0.34);
    box-shadow: 0 20px 42px rgba(97, 24, 24, 0.12);
}

.floating-save-dock {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    z-index: 1200;
}

.floating-save-dock__panel {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(88, 146, 233, 0.28);
    background: rgba(13, 20, 28, 0.92);
    box-shadow: 0 20px 42px rgba(3, 10, 18, 0.34);
    backdrop-filter: blur(18px) saturate(118%);
}

.floating-save-dock__text {
    font-weight: 700;
    color: var(--text-primary);
}

.floating-save-dock__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.mobile-only.admin-record-stack {
    display: none;
}

.risk-mobile-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(149, 180, 214, 0.14);
    border-left: 4px solid var(--accent-orange);
    background: linear-gradient(180deg, rgba(16, 28, 40, 0.96) 0%, rgba(10, 21, 31, 0.98) 100%);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.risk-results-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.risk-mobile-shell {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(149, 180, 214, 0.14);
    background: linear-gradient(180deg, rgba(17, 29, 41, 0.94) 0%, rgba(11, 22, 32, 0.98) 100%);
    box-shadow: var(--shadow-soft);
}

.risk-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.risk-mobile-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.risk-mobile-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.risk-mobile-card__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}

.risk-mobile-card__value {
    font-size: 0.86rem;
    color: var(--text-primary);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.risk-mobile-card__value--accent {
    color: var(--accent-orange);
    font-weight: 700;
}

.risk-mobile-card__footer {
    margin-top: 2px;
}

.risk-mobile-card__button {
    width: 100%;
    background: var(--accent-success);
}

.risk-mobile-card__resolved {
    width: 100%;
    justify-content: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.admin-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.admin-stat-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 156px;
}

.admin-stat-card__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.admin-stat-card__value {
    font-size: clamp(1.7rem, 2vw, 2.35rem);
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
}

.admin-stat-card__meta {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.admin-stat-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
}

.admin-module-grid {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.admin-panel--sticky {
    position: sticky;
    top: 92px;
    align-self: start;
    max-height: calc(100vh - 116px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

.admin-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-panel__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-panel__title h2,
.admin-panel__title h3,
.admin-panel__title h4 {
    margin: 0;
}

.admin-panel__kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.admin-panel__text {
    font-size: 0.84rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(149, 180, 214, 0.12);
    background: linear-gradient(180deg, rgba(22, 33, 46, 0.74) 0%, rgba(14, 24, 35, 0.86) 100%);
}

.admin-form-section--tight {
    padding: 16px;
}

.admin-form-section__heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-form-section__heading strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.admin-form-section__heading span {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.admin-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-toolbar-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-actions-row--end {
    justify-content: flex-end;
}

.admin-help-list,
.checklist,
.danger-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-help-list li,
.checklist li,
.danger-list li {
    position: relative;
    padding-left: 18px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.admin-help-list li::before,
.checklist li::before,
.danger-list li::before {
    content: "";
    position: absolute;
    top: 0.7em;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(83, 147, 238, 0.82);
    box-shadow: 0 0 0 4px rgba(83, 147, 238, 0.12);
}

.danger-list li::before {
    background: rgba(209, 77, 77, 0.9);
    box-shadow: 0 0 0 4px rgba(209, 77, 77, 0.12);
}

.admin-results-shell {
    padding: 0;
    overflow: hidden;
}

.admin-results-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px;
    border-bottom: var(--glass-border);
}

.admin-search-form {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex: 1;
    min-width: min(100%, 420px);
}

.admin-search-field {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-search-field label {
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.admin-search-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.admin-records {
    padding: 20px;
}

.admin-record-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.record-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(149, 180, 214, 0.12);
    background: linear-gradient(180deg, rgba(21, 32, 45, 0.86) 0%, rgba(14, 24, 34, 0.94) 100%);
    box-shadow: var(--shadow-soft);
}

.record-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.record-card__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.record-card__title strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.record-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.record-card__meta span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(152, 184, 217, 0.14);
    background: rgba(255, 255, 255, 0.03);
}

.record-card__badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.record-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.record-card__actions form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.record-card__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(149, 180, 214, 0.12);
}

.agent-card__forms {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 14px;
}

.agent-workspace-card {
    padding: 0;
    gap: 0;
    overflow: hidden;
}

.agent-row-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) minmax(220px, 1fr) auto;
    gap: 20px;
    align-items: flex-start;
    padding: 20px 22px;
}

.agent-row-cell {
    min-width: 0;
}

.agent-row-cell--identity {
    display: flex;
    align-items: flex-start;
}

.agent-row-cell--identity .record-card__title {
    gap: 10px;
}

.agent-row-cell--identity .record-card__title strong {
    font-size: 1.08rem;
    line-height: 1.3;
}

.agent-row-cell--identity .record-card__meta {
    flex-wrap: wrap;
    gap: 10px;
}

.agent-row-cell--summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 2px;
}

.agent-row-badges {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.agent-row-badges .status-pill {
    white-space: nowrap;
}

.agent-row-cell--summary .scope-summary {
    justify-content: flex-start;
}

.agent-row-cell--actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.agent-row-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    width: min(100%, 222px);
    margin-left: auto;
}

.agent-row-actions > .btn-premium,
.agent-row-actions > form,
.agent-row-action-form {
    width: auto;
}

.agent-row-actions form {
    display: flex;
}

.agent-row-actions .btn-premium {
    min-height: 46px;
    justify-content: center;
}

.agent-row-actions .btn-danger {
    box-shadow: none;
}

.agent-row-action-form .btn-premium {
    display: inline-flex;
}

.btn-icon-action {
    width: 48px;
    height: 48px;
    padding: 0;
    flex: 0 0 48px;
    border-radius: 14px;
}

.btn-icon-action i {
    font-size: 1rem;
}

.agent-inline-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-top: 1px solid rgba(149, 180, 214, 0.1);
    background: linear-gradient(180deg, rgba(14, 22, 33, 0.62) 0%, rgba(11, 18, 28, 0.82) 100%);
}

.agent-inline-panel[hidden],
.agent-inline-panel__section[hidden] {
    display: none !important;
}

.agent-inline-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.agent-inline-panel__title {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.agent-inline-panel__title strong {
    font-size: 1rem;
    color: var(--text-primary);
}

.agent-inline-panel__title span {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.agent-inline-panel__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.agent-inline-panel__nav .status-pill {
    border: 1px solid rgba(149, 180, 214, 0.16);
    cursor: pointer;
}

.agent-inline-panel__section {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.agent-inline-card {
    height: 100%;
}

.agent-contact-card {
    max-width: 760px;
}

.agent-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.agent-contact-grid .input-group:last-child {
    grid-column: 1 / -1;
}

.scope-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.scope-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.details-card {
    border-radius: 18px;
    border: 1px solid rgba(149, 180, 214, 0.12);
    background: linear-gradient(180deg, rgba(22, 33, 46, 0.72) 0%, rgba(14, 24, 35, 0.84) 100%);
    overflow: hidden;
}

.details-card summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.details-card summary::-webkit-details-marker {
    display: none;
}

.details-card summary span {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    font-weight: 500;
}

.details-card__header {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

.details-card__header span {
    display: block;
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
    font-weight: 500;
}

.details-card__content {
    padding: 0 18px 18px;
    border-top: 1px solid rgba(149, 180, 214, 0.1);
}

.multi-select-picker {
    border-radius: 16px;
    border: 1px solid rgba(149, 180, 214, 0.14);
    background: linear-gradient(180deg, rgba(19, 29, 41, 0.9) 0%, rgba(13, 21, 31, 0.96) 100%);
    box-shadow: inset 0 1px 0 rgba(172, 197, 226, 0.05);
    overflow: hidden;
}

.multi-select-picker summary {
    list-style: none;
    cursor: pointer;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.multi-select-picker summary:hover {
    background: rgba(255, 255, 255, 0.02);
}

.multi-select-picker summary::-webkit-details-marker {
    display: none;
}

.multi-select-picker summary i {
    color: var(--text-secondary);
    margin-top: 3px;
    transition: transform 0.2s ease;
}

.multi-select-picker[open] summary i {
    transform: rotate(180deg);
}

.multi-select-picker__header {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.multi-select-picker__label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.multi-select-picker__label strong {
    font-size: 0.95rem;
    color: var(--text-primary);
}

.multi-select-picker__label span {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.45;
}

.multi-select-picker__summary,
.multi-select-picker__selected {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.multi-select-picker__content {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(149, 180, 214, 0.1);
    background: rgba(7, 13, 20, 0.22);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.multi-select-picker__options {
    display: grid;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
}

.multi-select-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(149, 180, 214, 0.12);
    background: var(--bg-field);
    cursor: pointer;
    margin-left: 0;
    font-size: inherit;
    letter-spacing: normal;
    color: var(--text-primary);
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.multi-select-option:hover {
    border-color: rgba(88, 146, 233, 0.28);
    background: rgba(53, 115, 211, 0.08);
    transform: translateY(-1px);
}

.multi-select-option input[type="checkbox"] {
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin: 3px 0 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    box-shadow: none;
    flex: 0 0 16px;
    accent-color: var(--accent-primary);
    appearance: auto;
}

.multi-select-option input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(59, 141, 255, 0.55);
    outline-offset: 2px;
}

.multi-select-option__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.multi-select-option__text strong,
.multi-select-option__text small {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

.multi-select-option__text strong {
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 700;
}

.multi-select-option__text small {
    color: var(--text-secondary);
    font-size: 0.76rem;
    line-height: 1.4;
}

.field-chip--truncate {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

[data-theme="light"] .multi-select-picker {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 255, 0.98) 100%);
    border-color: rgba(133, 162, 194, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .multi-select-picker summary:hover {
    background: rgba(47, 135, 246, 0.04);
}

[data-theme="light"] .multi-select-picker summary i {
    color: rgba(56, 82, 110, 0.74);
}

[data-theme="light"] .multi-select-picker__content {
    background: rgba(244, 248, 253, 0.96);
    border-top-color: rgba(133, 162, 194, 0.16);
}

[data-theme="light"] .multi-select-option {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(133, 162, 194, 0.18);
}

[data-theme="light"] .multi-select-option:hover {
    background: rgba(47, 135, 246, 0.08);
    border-color: rgba(47, 135, 246, 0.26);
}

.surface-soft {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(149, 180, 214, 0.1);
    border-radius: 12px;
}

.surface-soft--danger {
    background: rgba(255, 59, 48, 0.05);
    border-color: rgba(255, 59, 48, 0.12);
}

.surface-soft--success {
    background: rgba(52, 199, 89, 0.06);
    border-color: rgba(52, 199, 89, 0.14);
}

.card-muted-note {
    background: rgba(255, 255, 255, 0.03);
}

.callout-danger-soft {
    background: rgba(255, 69, 58, 0.1);
    border: 1px dashed var(--accent-danger);
    padding: 10px;
    border-radius: 12px;
}

.callout-danger-soft__title {
    color: var(--accent-danger);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
}

[data-theme="light"] .surface-soft {
    background: rgba(248, 251, 255, 0.96);
    border-color: rgba(133, 162, 194, 0.18);
}

[data-theme="light"] .surface-soft--danger {
    background: rgba(255, 243, 243, 0.98);
    border-color: rgba(204, 60, 60, 0.18);
}

[data-theme="light"] .surface-soft--success {
    background: rgba(241, 251, 245, 0.98);
    border-color: rgba(32, 149, 90, 0.18);
}

[data-theme="light"] .card-muted-note {
    background: rgba(248, 251, 255, 0.96);
}

[data-theme="light"] .callout-danger-soft {
    background: rgba(255, 244, 244, 0.98);
    border-color: rgba(204, 60, 60, 0.3);
}

.data-module-grid,
.danger-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 20px;
    align-items: start;
}

.data-action-grid,
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.data-action-card,
.template-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.module-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.config-create-panel {
    height: auto;
    min-height: max-content;
    overflow: visible;
}

.config-create-panel .admin-form {
    min-height: max-content;
}

.admin-form-actions-panel {
    margin-top: 2px;
}

.admin-form-actions-panel .admin-actions-row {
    width: 100%;
}

.module-panel--accent {
    border-color: rgba(88, 146, 233, 0.26);
}

.module-panel--danger {
    border-color: rgba(209, 77, 77, 0.28);
}

.module-pill-row,
.field-chip-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.field-chip {
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(152, 184, 217, 0.14);
    background: rgba(255, 255, 255, 0.03);
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-secondary);
}

.template-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.template-card__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(57, 125, 223, 0.14);
    color: #9fc4ff;
    border: 1px solid rgba(88, 146, 233, 0.16);
}

.template-card__stats {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.77rem;
    color: var(--text-secondary);
}

.template-card__stats span {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(152, 184, 217, 0.14);
}

.dataset-selection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dataset-choice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(152, 184, 217, 0.14);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.dataset-choice:hover {
    border-color: rgba(88, 146, 233, 0.3);
    background: rgba(53, 115, 211, 0.08);
    transform: translateY(-1px);
}

.dataset-choice input {
    width: 18px;
    height: 18px;
    margin: 2px 0 0;
    flex: 0 0 auto;
}

.dataset-choice__body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dataset-choice__body strong {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.dataset-choice__body span {
    font-size: 0.76rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.danger-zone {
    border-color: rgba(209, 77, 77, 0.28);
    background: linear-gradient(180deg, rgba(46, 17, 20, 0.82) 0%, rgba(27, 13, 17, 0.94) 100%);
}

.danger-zone .admin-panel__kicker,
.danger-zone .admin-panel__text,
.danger-zone .danger-list li,
.danger-zone .checklist li {
    color: rgba(255, 226, 226, 0.82);
}

.selection-hint {
    font-size: 0.78rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.table-cell-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-cell-meta strong {
    color: var(--text-primary);
}

.table-cell-meta span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.config-table {
    min-width: 100%;
    border-spacing: 0 12px;
}

.config-table td {
    vertical-align: middle;
    background: linear-gradient(180deg, rgba(21, 32, 45, 0.86) 0%, rgba(14, 24, 34, 0.94) 100%);
    border-top: 1px solid rgba(149, 180, 214, 0.12);
    border-bottom: 1px solid rgba(149, 180, 214, 0.12);
}

.config-table tbody tr td:first-child {
    border-left: 1px solid rgba(149, 180, 214, 0.12);
    border-radius: 18px 0 0 18px;
}

.config-table tbody tr td:last-child {
    border-right: 1px solid rgba(149, 180, 214, 0.12);
    border-radius: 0 18px 18px 0;
}

.config-table__status-cell,
.config-table__price-cell {
    white-space: nowrap;
}

.config-table__status-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.config-table__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.config-table__actions form,
.config-table__single-action {
    display: flex;
    align-items: center;
}

.config-table__actions .btn-premium,
.config-table__single-action .btn-premium {
    min-height: 42px;
}

[data-theme="light"] .config-table td {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(244, 248, 253, 0.98) 100%);
    border-top-color: rgba(133, 162, 194, 0.18);
    border-bottom-color: rgba(133, 162, 194, 0.18);
}

[data-theme="light"] .config-table tbody tr td:first-child,
[data-theme="light"] .config-table tbody tr td:last-child {
    border-color: rgba(133, 162, 194, 0.18);
}

[data-theme="light"] .admin-form-section,
[data-theme="light"] .record-card,
[data-theme="light"] .details-card,
[data-theme="light"] .dataset-choice,
[data-theme="light"] .field-chip,
[data-theme="light"] .template-card__stats span,
[data-theme="light"] .record-card__meta span {
    background: rgba(248, 251, 255, 0.92);
    border-color: rgba(133, 162, 194, 0.16);
}

[data-theme="light"] .danger-zone {
    background: linear-gradient(180deg, rgba(255, 244, 244, 0.98) 0%, rgba(255, 236, 236, 1) 100%);
}

[data-theme="light"] .danger-zone .admin-panel__kicker {
    color: rgba(170, 73, 73, 0.9);
}

[data-theme="light"] .danger-zone .admin-panel__text,
[data-theme="light"] .danger-zone .admin-form-section__heading span,
[data-theme="light"] .danger-zone .selection-hint,
[data-theme="light"] .danger-zone .danger-list li,
[data-theme="light"] .danger-zone .checklist li {
    color: rgba(112, 66, 66, 0.88);
}

[data-theme="light"] .danger-zone .danger-list li::before {
    background: rgba(204, 60, 60, 0.92);
    box-shadow: 0 0 0 4px rgba(204, 60, 60, 0.12);
}

[data-theme="light"] .danger-zone .admin-form-section,
[data-theme="light"] .danger-zone .dataset-choice,
[data-theme="light"] .danger-zone select[multiple] {
    background: rgba(255, 251, 251, 0.98);
    border-color: rgba(204, 60, 60, 0.12);
}

[data-theme="light"] .risk-mobile-card,
[data-theme="light"] .risk-mobile-shell {
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96) 0%, rgba(244, 248, 253, 0.98) 100%);
    border-color: rgba(133, 162, 194, 0.18);
}

[data-theme="light"] .auth-brand,
[data-theme="light"] .auth-panel {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 250, 255, 0.98) 100%);
}

[data-theme="light"] .auth-brand__point {
    background: rgba(37, 110, 217, 0.05);
    border-color: rgba(126, 154, 184, 0.18);
}

[data-theme="light"] .floating-save-dock__panel {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 32px rgba(32, 52, 75, 0.14);
}

@media (max-width: 1380px) {
    .agent-row-grid {
        grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    }

    .agent-row-cell--actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .agent-row-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
}

/* Responsive behavior */
@media (max-width: 1024px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100dvh;
    }

    .app-container {
        display: block;
        height: auto;
        min-height: 100dvh;
    }

    .mobile-menu-btn {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: min(82vw, 320px);
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 1250;
        padding-top: 72px;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        min-height: 100dvh;
        overflow: visible;
        padding: 72px 16px 28px;
    }

    .main-content__inner {
        gap: 18px;
    }

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .kpi-grid-tight,
    .skeleton-grid-4,
    .skeleton-grid-2 {
        grid-template-columns: 1fr;
    }

    .flex-between {
        flex-wrap: wrap;
        gap: 12px;
        align-items: flex-start;
    }

    .card {
        padding: 18px;
        border-radius: 18px;
    }

    .page-header--split {
        align-items: flex-start;
    }

    .page-header__meta {
        text-align: left;
    }

    .premium-table {
        min-width: 680px;
    }

    .auth-card {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
    }

    .inventory-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-overview-grid,
    .data-action-grid,
    .template-grid,
    .dataset-selection-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-module-grid,
    .data-module-grid,
    .danger-grid,
    .agent-card__forms,
    .scope-grid,
    .agent-contact-grid,
    .agent-row-grid {
        grid-template-columns: 1fr;
    }

    .agent-row-cell--actions,
    .agent-inline-panel__head {
        justify-content: flex-start;
    }

    .agent-row-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .agent-inline-panel__head {
        flex-direction: column;
    }

    .admin-panel--sticky {
        position: static;
    }
}

@media (max-width: 640px) {
    .main-content {
        padding: 70px 12px 24px;
    }

    h1 {
        font-size: 1.7rem;
        line-height: 1.2;
    }

    .subtitle {
        font-size: 0.7rem;
        letter-spacing: 0.13em;
    }

    .btn-premium {
        padding: 10px 14px;
        font-size: 0.82rem;
    }

    .nav-item {
        padding: 12px 14px;
        font-size: 0.87rem;
    }

    .search-container {
        width: 100%;
        min-width: 0 !important;
        padding: 10px 12px;
        gap: 8px;
    }

    .search-input {
        font-size: 0.96rem;
    }

    .filter-toolbar {
        align-items: stretch;
        padding: 14px;
    }

    .erp-block {
        padding: 16px;
        border-radius: 14px;
    }

    .filter-form {
        width: 100%;
    }

    .filter-form input,
    .filter-form select,
    .filter-form .btn-premium,
    .filter-toolbar-right .btn-premium {
        width: 100%;
    }

    .filter-stat {
        border-left: none;
        padding-left: 0;
        width: 100%;
        text-align: left;
    }

    .theme-toggle--compact .theme-toggle-label {
        display: none;
    }

    .theme-toggle--compact {
        min-width: 40px;
        padding: 8px;
    }

    .dashboard-alert__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .config-tabs {
        width: 100%;
    }

    .premium-table th {
        font-size: 0.68rem;
        padding: 0 12px 8px;
    }

    .premium-table td {
        padding: 12px;
    }

    .modal-content {
        width: calc(100% - 24px);
        max-width: 420px;
        padding: 22px;
        margin-top: 0;
    }

    .modal-actions {
        flex-direction: column;
    }

    .page-header {
        padding: 20px 18px;
        border-radius: 22px;
    }

    .auth-page {
        padding: 14px;
    }

    .auth-brand,
    .auth-panel {
        border-radius: 22px;
    }

    .auth-brand {
        padding: 24px;
    }

    .auth-panel {
        padding: 18px;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .risk-mobile-card__meta {
        grid-template-columns: 1fr;
    }

    .admin-overview-grid,
    .data-action-grid,
    .template-grid,
    .dataset-selection-grid {
        grid-template-columns: 1fr;
    }

    .admin-results-toolbar,
    .admin-records {
        padding: 16px;
    }

    .admin-search-form,
    .admin-toolbar-compact,
    .admin-actions-row,
    .record-card__actions,
    .record-card__actions form,
    .admin-stat-card__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-search-form .btn-premium,
    .admin-toolbar-compact .btn-premium,
    .admin-actions-row .btn-premium,
    .record-card__actions .btn-premium,
    .record-card__actions form .btn-premium,
    .admin-stat-card__actions .btn-premium {
        width: 100%;
    }

    .record-card,
    .admin-form-section,
    .data-action-card,
    .template-card {
        padding: 16px;
    }

    .agent-workspace-card {
        padding: 0;
    }

    .agent-row-grid,
    .agent-inline-panel {
        padding: 16px;
    }

    .agent-row-actions {
        gap: 8px;
    }

    .details-card summary,
    .details-card__content {
        padding-left: 16px;
        padding-right: 16px;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .mobile-only.admin-record-stack {
        display: flex;
    }

    .floating-save-dock {
        left: 12px;
        right: 12px;
        transform: none;
        bottom: 16px;
    }

    .floating-save-dock__panel {
        width: 100%;
    }

    .floating-save-dock__actions {
        width: 100%;
    }

    .floating-save-dock__actions .btn-premium {
        flex: 1 1 calc(50% - 5px);
    }

    .agent-content {
        padding: 20px 14px 28px;
    }

    .agent-topbar {
        padding: 14px 16px;
    }

    .mode-selector {
        grid-template-columns: 1fr;
    }

    .product-row {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

@media (max-height: 720px) {
    .modal-content {
        margin-top: 0;
    }
}
