/* 
    PLATFORM.CSS - Глобальная дизайн-система БАЗА 
    Все пути и стили оптимизированы для локального открытия (file://)
*/

:root {
    --bg-main: #0b0f1a;
    --bg-sidebar: rgba(7, 12, 26, 0.8);
    --bg-card: rgba(30, 41, 59, 0.7);
    --bg-input: rgba(15, 23, 42, 0.8);
    --accent: #3b82f6;
    --accent-secondary: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --text-main: #f8fafc;
    --text-secondary: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', -apple-system, sans-serif;
    height: 100vh;
    overflow: hidden;
}

#app-shell {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.platform-sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 32px 0;
    z-index: 100;
}

.logo {
    padding: 0 24px 32px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-accent {
    color: var(--accent);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.2s;
    font-weight: 500;
}

.cart-badge {
    position: absolute;
    right: 20px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Orders View */
.orders-view-container {
    padding: 48px 32px;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
}

.order-item-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideIn 0.3s ease-out;
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.item-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.item-qty {
    font-weight: 700;
    color: var(--accent);
}

.item-price {
    font-size: 18px;
    font-weight: 800;
}

.btn-del {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.badge-insulated {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-secondary);
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    margin-top: 8px;
    text-transform: uppercase;
}

.orders-summary {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    padding: 32px;
    border-radius: 20px;
    height: fit-content;
    position: sticky;
    top: 40px;
}

.summary-line {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.total-val {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

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

.nav-item:hover,
.nav-item.active {
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.1);
    border-left: 3px solid var(--accent);
}

.icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Main Area */
.platform-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-main);
    overflow-y: auto;
}

.main-header {
    height: 70px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.header-breadcrumb {
    color: var(--text-secondary);
    font-size: 14px;
}

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

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

/* Dashboard Hub */
.dashboard-hub {
    padding: 48px 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.hub-hero {
    margin-bottom: 48px;
}

.hub-hero h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.hub-hero p {
    color: var(--text-secondary);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 32px;
    cursor: pointer;
    transition: 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.product-card.disabled {
    opacity: 0.5;
    cursor: default;
    filter: grayscale(0.5);
    pointer-events: none;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: 0.4s;
}

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

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent);
    box-shadow: var(--shadow-premium);
}

.card-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 16px;
}

.card-info h3 {
    margin-bottom: 8px;
}

.card-info p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-status {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.status-dev {
    background: rgba(234, 179, 8, 0.1);
    color: #eab308;
}

/* Configurator Layout */
.configurator-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    height: calc(100vh - 70px);
}

.config-sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 32px;
    overflow-y: auto;
}

.config-canvas {
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at 50% 50%, #1e293b 0%, #0b0f1a 100%);
}

.canvas-wrapper {
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16/10;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

#main-svg {
    width: 90%;
    height: 90%;
}

.canvas-controls {
    margin-top: 24px;
    display: flex;
    gap: 12px;
}

/* UI Elements */
.platform-input,
.platform-select {
    width: 100%;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
    transition: all 0.2s ease;
    outline: none;
}

.platform-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2360a5fa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 40px;
    cursor: pointer;
}

.platform-input:focus,
.platform-select:focus {
    border-color: var(--accent);
    background-color: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

/* Premium Section Card */
.platform-section-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 20px;
    margin-top: 24px;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.platform-section-card:has(.platform-dropdown.open) {
    z-index: 50;
}

.platform-section-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(30, 41, 59, 0.4);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--accent-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.price-display {
    margin-top: 24px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--accent);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent);
}

.hidden {
    display: none !important;
}

/* Buttons */
.unit-toggle-container {
    padding: 0;
    margin-bottom: 24px;
}

.unit-toggle {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 4px;
    display: flex;
    gap: 4px;
}

.unit-btn {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    padding: 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-btn:hover {
    color: var(--text-main);
}

.unit-btn.active {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

/* Material Texture Classes (for future use if needed via CSS) */
.texture-pvc {
    background-color: #334155;
    position: relative;
}

.texture-pvc::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
}

.btn-p {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.btn-s {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
}

/* Cart Tabs & Customer Data Form */
.cart-tabs {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 32px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-self: flex-start;
}

.cart-tab {
    padding: 10px 24px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cart-tab.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.customer-data-form {
    padding: 8px;
}

.form-section {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.type-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-btn {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.toggle-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.export-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.3s ease;
    padding: 10px;
    text-align: center;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.badge-insulated {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-top: 4px;
}

.cart-scroll-area {
    max-height: calc(100vh - 425px);
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 20px;
}

.cart-scroll-area::-webkit-scrollbar {
    width: 4px;
}

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

.btn-glow {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.2);
}

/* --- Improved Orders View & Cart Tabs --- */
.orders-view-container {
    padding: 32px;
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.cart-tabs {
    display: inline-flex;
    gap: 4px;
    margin: 0 auto 32px auto;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-tab {
    padding: 10px 28px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.cart-tab:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.03);
}

.cart-tab.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.order-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.order-item-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.customer-data-form {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 32px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    padding: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
}

.product-card.disabled {
    opacity: 0.4;
    filter: grayscale(0.8);
    cursor: not-allowed !important;
    pointer-events: none;
}

.product-card.disabled .status-badge {
    background: #475569;
}

/* --- Custom Premium UI Kit (Phase 8) --- */

/* Hide default number spin buttons */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
}

/* Custom Checkbox */
.platform-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-left: 32px;
}

.platform-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.platform-checkbox:hover input~.checkmark {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
}

.platform-checkbox input:checked~.checkmark {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.platform-checkbox input:checked~.checkmark:after {
    display: block;
}

/* Custom Stepper (Number +/-) */
.platform-stepper {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    height: 44px;
    transition: border-color 0.2s;
}

.platform-stepper:focus-within {
    border-color: var(--accent);
}

.stepper-btn {
    width: 44px;
    height: 100%;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
}

.stepper-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.stepper-btn:active {
    background: rgba(var(--accent), 0.1);
    color: var(--accent);
}

.stepper-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
}

.stepper-input:focus {
    outline: none;
}

/* Custom Dropdown (Premium) */
.platform-dropdown {
    position: relative;
    width: 100%;
    user-select: none;
}

.dropdown-selected {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 40px 0 16px;
    height: 44px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-selected::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 12px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.platform-dropdown.open .dropdown-selected {
    border-color: var(--accent);
    background: rgba(30, 58, 138, 0.2);
}

.platform-dropdown.open .dropdown-selected::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.platform-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.dropdown-item:hover,
.dropdown-item.active {
    background: rgba(59, 130, 246, 0.1);
    color: white;
    padding-left: 20px;
}

/* --- Order Data Form Extensions --- */
.form-section-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--accent);
    margin: 24px 0 16px;
    letter-spacing: 0.5px;
    grid-column: span 2;
    border-bottom: 1px solid var(--border);
    padding-bottom: 8px;
}

.data-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Color Picker Styles */
.color-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-swatch:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.color-swatch.active {
    border-color: var(--accent);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.color-swatch[data-color="black"].active::after,
.color-swatch[data-color="khaki"].active::after,
.color-swatch[data-color="grey"].active::after {
    color: #fff;
}

/* --- Auth Screen --- */
#auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #0b0f1a;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 48px;
    border-radius: 32px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.login-logo {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 40px;
}

.login-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    padding: 16px 20px;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    margin-bottom: 16px;
    outline: none;
    transition: 0.3s;
}

.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

.btn-login {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px var(--accent-glow);
}

.login-error {
    color: #ef4444;
    font-size: 13px;
    margin-bottom: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- Settings View --- */
.settings-container {
    padding: 48px;
    max-width: 1000px;
    margin: 0 auto;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.user-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.user-table th {
    text-align: left;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 800;
}

.user-table tr {
    background: var(--bg-card);
    transition: 0.2s;
}

.user-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.user-table td {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.user-table td:first-child {
    border-left: 1px solid var(--border);
    border-radius: 12px 0 0 12px;
}

.user-table td:last-child {
    border-right: 1px solid var(--border);
    border-radius: 0 12px 12px 0;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: 0.2s;
}

.btn-icon:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-add-user {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Modal Form styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(11, 15, 26, 0.9);
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #1e293b;
    padding: 32px;
    border-radius: 20px;
    width: 400px;
    border: 1px solid var(--glass-border);
}