:root {
    --ink: #0f172a;
    --ink2: #1e293b;
    --ink3: #334155;
    --brand: #1e40af; /* Professional Navy Blue */
    --brand-dark: #1e3a8a;
    --brand-dim: rgba(30, 64, 175, 0.08);
    --slate: #f8fafc;
    --slate2: #f1f5f9;
    --slate3: #e2e8f0;
    --white: #ffffff;
    --muted: #64748b;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --gold: #f59e0b;
    --green: #10b981;
    --green-dim: rgba(16, 185, 129, 0.1);
    --accent: #1e40af;
    --accent-dim: rgba(30, 64, 175, 0.1);
    
    /* Premium Gradients */
    --grad-brand: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    --grad-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --grad-green: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-ink: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    
    /* Soft Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 10px 30px -10px rgba(30, 64, 175, 0.2);
    
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --font-display: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
}

.glass { background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--glass-border); }
.glass-dark { background: rgba(15, 23, 42, 0.8); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.1); }

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

body {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    background: radial-gradient(circle at 0% 0%, rgba(37, 99, 235, 0.05) 0%, rgba(241, 245, 249, 1) 50%, rgba(226, 232, 240, 1) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 230px;
    height: 100vh;
    background: var(--ink);
    border-right: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

/* Premium Sidebar Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-logo {
    padding: 28px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo-mark {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
    line-height: 1;
}

.logo-text span {
    color: var(--brand);
}

.logo-sub {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
    margin-top: 4px;
}

.sidebar-nav {
    padding: 20px 14px;
    flex: 1;
}

.nav-label {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 0 8px;
    margin-bottom: 8px;
    margin-top: 20px;
}

.nav-label:first-child {
    margin-top: 0;
}

.nav-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.18s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    position: relative;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-item.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.nav-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.7;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

.nav-badge {
    margin-left: auto;
    background: var(--brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    min-width: 18px;
    text-align: center;
}

.nav-item.active .nav-badge {
    background: rgba(255, 255, 255, 0.25);
}

.sidebar-footer {
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-footer p {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3px;
}

/* Role badge in sidebar */
.role-badge-wrap {
    padding: 12px 22px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.role-badge.manager {
    background: rgba(37, 99, 235, 0.15);
    color: #60a5fa;
}

.role-badge.admin {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.role-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

/* ── MAIN ── */
.main {
    margin-left: 230px;
    flex: 1;
    padding: 32px 32px 48px;
    min-height: 100vh;
}

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

.page-title {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.page-subtitle {
    font-size: 13px;
    color: var(--muted);
    margin-top: 5px;
    font-weight: 400;
}

/* ── CARDS ── */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-bottom: 18px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--slate2);
}

.card-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-icon {
    width: 28px;
    height: 28px;
    background: var(--brand-dim);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 14px;
    height: 14px;
    stroke: var(--brand);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ── FORM ── */
.form-grid {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

input[type=text],
input[type=number],
select {
    height: 38px;
    padding: 0 12px;
    border: 1.5px solid var(--slate3);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--slate);
    outline: none;
    transition: all 0.15s;
    -webkit-appearance: none;
}

input[type=text]:focus,
input[type=number]:focus,
select:focus {
    border-color: var(--brand);
    background: white;
}

input[type=text] {
    min-width: 160px;
}

input[type=number] {
    width: 120px;
}

select {
    min-width: 100px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7f96' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

/* ── BUTTONS ── */
.btn {
    height: 38px;
    padding: 0 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--slate3);
    background: var(--white);
    color: var(--ink2);
    font-family: var(--font-body);
    transition: all 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--slate);
}

.btn-primary {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.btn-primary:hover {
    background: var(--ink2);
}

.btn-brand {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    font-weight: 700;
}

.btn-brand:hover {
    background: var(--brand-dark);
}

.btn-danger {
    color: var(--danger);
    border-color: #fbd5d0;
    background: var(--danger-bg);
}

.btn-danger:hover {
    background: #fce8e5;
}

.btn-ghost {
    border-color: transparent;
    background: var(--brand-dim);
    color: var(--brand-dark);
    font-weight: 600;
}

.btn-ghost:hover {
    background: rgba(59, 130, 246, 0.2);
}

.btn-green {
    background: var(--green);
}

.btn-green:hover {
    background: #059669;
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-accent:hover {
    background: var(--brand-dark);
}

.btn-sm {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    border-radius: 8px;
}

.btn-xs {
    height: 26px;
    padding: 0 9px;
    font-size: 11px;
    border-radius: 7px;
}

/* ── TABLE ── */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

thead tr {
    background: var(--slate);
}

th {
    text-align: left;
    padding: 9px 14px;
    font-size: 10px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-bottom: 1.5px solid var(--slate2);
}

td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--slate);
    vertical-align: middle;
}

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

tbody tr:hover {
    background: var(--slate);
}

.empty {
    color: #bbb;
    font-size: 13px;
    padding: 28px 0;
    text-align: center;
}

/* ── CHIPS ── */
.chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--slate2);
    color: var(--muted);
}

.chip-brand {
    background: var(--brand-dim);
    color: var(--brand-dark);
}

.chip-blue {
    background: var(--brand-dim);
    color: var(--brand-dark);
}

.chip-gold {
    background: #fef3d5;
    color: #b07d04;
}

.chip-count {
    background: var(--ink);
    color: #fff;
}

.chip-green {
    background: var(--green-dim);
    color: #065f46;
}

.chip-red {
    background: #fee2e2;
    color: #b91c1c;
}

.chip-accent {
    background: var(--accent-dim);
    color: var(--accent);
}

/* ── STAGE BLOCKS ── */
.stage-wrap {
    margin-bottom: 10px;
}

.stage-card {
    background: var(--slate);
    border: 1.5px solid var(--slate2);
    border-radius: var(--radius);
    transition: border-color 0.15s;
}

.stage-card:hover {
    border-color: var(--slate3);
}

.stage-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: #f7f9fc;
    border-bottom: 1px solid var(--slate2);
}

.stage-num {
    width: 22px;
    height: 22px;
    background: var(--brand);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.stage-name-input {
    height: 28px !important;
    background: transparent !important;
    border: 1.5px solid transparent !important;
    font-weight: 600 !important;
    color: var(--ink) !important;
    padding: 0 8px !important;
    min-width: 140px;
    font-size: 13px !important;
    border-radius: 6px !important;
}

.stage-name-input:focus {
    background: white !important;
    border-color: var(--brand) !important;
}

.stage-body {
    padding: 12px 14px;
}

.stage-item-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px dashed var(--slate2);
    flex-wrap: wrap;
}

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

.stage-item-name {
    flex: 1;
    font-weight: 500;
    font-size: 13px;
    min-width: 100px;
}

.stage-add {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 14px;
    background: #f2f5f9;
    border-top: 1px solid var(--slate2);
    flex-wrap: wrap;
}

/* ── METRICS ── */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.metric-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--slate2);
}

.metric-card.accent::before {
    background: var(--brand);
}

.metric-card.gold::before {
    background: var(--gold);
}

.metric-card.green::before {
    background: var(--green);
}

.metric-card.secondary::before {
    background: var(--accent);
}

.metric-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.metric-icon.brand {
    background: var(--brand-dim);
}

.metric-icon.gold {
    background: #fef3d5;
}

.metric-icon.slate {
    background: var(--slate2);
}

.metric-icon.green {
    background: var(--green-dim);
}

.metric-icon.accent {
    background: var(--accent-dim);
}

.metric-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

.metric-icon.brand svg {
    stroke: var(--brand);
}

.metric-icon.gold svg {
    stroke: var(--gold);
}

.metric-icon.slate svg {
    stroke: var(--muted);
}

.metric-icon.green svg {
    stroke: var(--green);
}

.metric-icon.accent svg {
    stroke: var(--accent);
}

.metric-val {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.metric-lbl {
    font-size: 11px;
    color: var(--muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── RESULT TABLE ── */
.result-section td {
    background: #f4f7fc;
    font-weight: 700;
    font-size: 13px;
}

.result-sub td {
    color: var(--muted);
    background: #fafbfc;
}

.result-sub td:first-child {
    padding-left: 30px;
}

.result-total td {
    font-weight: 700;
    border-top: 2px solid var(--slate3) !important;
    padding-top: 14px;
}

.result-margin td {
    color: var(--muted);
}

.result-sale td {
    font-size: 15px;
    font-weight: 800;
    color: var(--brand-dark);
}

/* ── STATS BAR ── */
.stats-bar {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    align-items: center;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink2) 100%);
    border-radius: var(--radius);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.stats-bar span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.stats-bar strong {
    font-size: 12px;
    color: #fff;
}

.stats-bar-sep {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

/* ── PROD CARD ── */
.prod-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    overflow: hidden;
}

.prod-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--slate);
    background: linear-gradient(135deg, #fafbfd 0%, var(--slate) 100%);
    flex-wrap: wrap;
    gap: 10px;
}

.prod-card-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 10px;
}

.prod-dot {
    width: 10px;
    height: 10px;
    background: var(--brand);
    border-radius: 50%;
    flex-shrink: 0;
}

.prod-card-meta {
    font-size: 12px;
    color: var(--muted);
    margin-top: 3px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.prod-card-body {
    padding: 16px 22px;
}

/* ── STOCK TABLE ── */
.stock-low {
    background: #fff7ed !important;
}

.stock-critical {
    background: #fef2f2 !important;
}

.stock-bar-wrap {
    width: 100px;
    height: 8px;
    background: var(--slate2);
    border-radius: 4px;
    overflow: hidden;
}

.stock-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s;
}

.stock-bar.ok {
    background: var(--green);
}

.stock-bar.low {
    background: var(--gold);
}

.stock-bar.critical {
    background: var(--danger);
}

/* ── LOGIN ── */
.login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding-top: 0;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
    text-align: center;
    border: 1px solid var(--slate3);
}

.login-card h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--ink);
    margin-bottom: 8px;
}

.login-card p {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.login-field {
    text-align: left;
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-field input {
    width: 100%;
    height: 46px;
    border-radius: 10px;
    padding: 0 16px;
    font-size: 15px;
    border: 1.5px solid var(--slate3);
    background: var(--slate);
    transition: all 0.2s;
}

.login-field input:focus {
    border-color: var(--brand);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-dim);
}

/* Role selector */
.role-selector {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.role-btn {
    padding: 14px 10px;
    border: 2px solid var(--slate3);
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    background: var(--slate);
    min-width: 120px;
}

.role-btn:hover {
    border-color: var(--brand-dim);
    background: #f0f5ff;
}

.role-btn.selected {
    border-color: var(--brand);
    background: var(--brand-dim);
}

.role-btn.selected.green-role {
    border-color: var(--green);
    background: var(--green-dim);
}

.role-btn.selected.accent-role {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.role-btn .role-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.role-btn .role-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-btn .role-desc {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.anim {
    animation: fadeUp 0.25s ease forwards;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--slate3);
    border-radius: 10px;
}

.divider {
    height: 1px;
    background: var(--slate2);
    margin: 16px 0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--muted);
}

.empty-state svg {
    width: 40px;
    height: 40px;
    stroke: var(--slate3);
    margin-bottom: 12px;
}

.hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

@media (max-width:768px) {
    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .metrics-row {
        grid-template-columns: 1fr;
    }

    .layout {
        flex-direction: column;
    }
}
/* ── CUSTOM SEARCHABLE DROPDOWN ── */
.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid var(--slate3);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 4px;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-item {
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border-bottom: 1px solid var(--slate2);
}

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

.dropdown-item:hover, .dropdown-item.active {
    background: var(--brand-dim);
}

.dropdown-item .item-code {
    background: var(--slate2);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.dropdown-item:hover .item-code, .dropdown-item.active .item-code {
    background: var(--brand);
    color: #fff;
}

.dropdown-item .item-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
}

.dropdown-no-results {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

/* Custom Button Styles for Results Bar */
.btn-export-sheet {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.2s ease;
}
.btn-export-sheet:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.8);
}

.btn-reduce-stock {
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
    transition: all 0.2s ease;
}
.btn-reduce-stock:hover:not(:disabled) {
    background: #334155; /* Slate 700 */
    border-color: #334155;
}
.btn-reduce-stock:disabled {
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    cursor: not-allowed;
}

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
    position: fixed;
    bottom: 88px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* ── FLOATING LOGOUT BUTTON ── */
#floating-logout-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #991b1b;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.4);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.2s ease;
    outline: none;
}

#floating-logout-btn:hover {
    transform: scale(1.1);
    background-color: #7f1d1d;
    box-shadow: 0 6px 16px rgba(153, 27, 27, 0.6);
}

.toast {
    min-width: 300px;
    max-width: 450px;
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    font-weight: 500;
    font-size: 14px;
    pointer-events: auto;
    animation: toast-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: all 0.3s ease;
}

.toast.hiding {
    animation: toast-out 0.3s ease forwards;
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast.success .toast-icon { background: var(--green-dim); color: var(--green); }
.toast.error .toast-icon { background: var(--danger-bg); color: var(--danger); }
.toast.info .toast-icon { background: var(--brand-dim); color: var(--brand); }
.toast.warning .toast-icon { background: rgba(245, 158, 11, 0.1); color: var(--gold); }

@keyframes toast-in {
    from { transform: translateX(100%) scale(0.9); opacity: 0; }
    to { transform: translateX(0) scale(1); opacity: 1; }
}

@keyframes toast-out {
    to { transform: translateX(100%) scale(0.9); opacity: 0; }
}
