/* GestOS — interface empresarial */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --sidebar-w: 220px;
    --sidebar-w-collapsed: 60px;
    --sidebar-bg: #252b36;
    --sidebar-border: #3a4150;
    --sidebar-text: #b8bec8;
    --sidebar-hover: #323945;
    --sidebar-active: #1e3a5f;

    --header-bg: #1a5f9e;
    --header-text: #fff;

    --page-bg: #cdd2da;
    --surface: #ffffff;
    --surface-alt: #f4f5f7;

    --text: #111827;
    --text-secondary: #374151;
    --muted: #6b7280;

    --line: #9ca3af;
    --line-light: #d1d5db;

    --blue: #1a5f9e;
    --blue-dark: #144a7a;
    --blue-light: #dbeafe;

    --green: #166534;
    --green-bg: #dcfce7;
    --amber: #92400e;
    --amber-bg: #fef3c7;
    --red: #991b1b;
    --red-bg: #fee2e2;
    --orange: #9a3412;
    --orange-bg: #ffedd5;

    --radius: 6px;
    --radius-sm: 4px;
    --elevation-1: 0 1px 3px rgba(17, 24, 39, 0.1), 0 1px 2px rgba(17, 24, 39, 0.06);
    --elevation-2: 0 4px 8px rgba(17, 24, 39, 0.1), 0 2px 4px rgba(17, 24, 39, 0.06);
    --mono: Consolas, 'Courier New', ui-monospace, monospace;

    --main-bg: var(--page-bg);
    --card-bg: var(--surface);
    --border: var(--line-light);
    --primary: var(--blue);
    --primary-hover: var(--blue-dark);
    --text-muted: var(--muted);
}

html { font-size: 13px; }
body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--page-bg);
    color: var(--text);
    line-height: 1.45;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Shell ── */
.app, .app-shell { display: flex; min-height: 100vh; }
.workspace, .main-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.page, .content { padding: 18px 22px 28px; flex: 1; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    border-right: 1px solid #1a1f28;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.12);
    transition: width 0.2s ease;
    overflow: hidden;
}

.sidebar-brand {
    padding: 14px 12px 12px;
    border-bottom: 1px solid var(--sidebar-border);
    background: #1e242e;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.brand-title, .sidebar-logo {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.01em;
    min-width: 0;
    flex: 1;
}
.brand-title:hover, .sidebar-logo:hover { color: #fff; text-decoration: none; }

.brand-short { display: none; }
.brand-icon, .login-brand-icon { display: none; }

.sidebar-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-sm);
    background: var(--sidebar-hover);
    color: var(--sidebar-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.sidebar-toggle:hover { background: #3d4554; color: #fff; }
.sidebar-toggle-icon { transition: transform 0.2s ease; }
.app.sidebar-collapsed .sidebar-toggle-icon { transform: rotate(180deg); }

.brand-sub, .sidebar-org {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: #9aa0ab;
    font-weight: 400;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav { flex: 1; padding: 6px 0; overflow-x: hidden; overflow-y: auto; }
.nav-label, .nav-section-title {
    padding: 10px 14px 3px;
    font-size: 10px;
    font-weight: 600;
    color: #8b919c;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.nav-link, .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 400;
    color: var(--sidebar-text);
    text-decoration: none;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    position: relative;
    white-space: nowrap;
}
.nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.75;
}
.nav-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-link:hover, .nav-item:hover { background: var(--sidebar-hover); color: #fff; text-decoration: none; }
.nav-link:hover .nav-icon, .nav-item:hover .nav-icon { opacity: 1; }
.nav-link.active, .nav-item.is-active, .nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    border-left-color: #60a5fa;
    font-weight: 600;
}
.nav-link.active .nav-icon, .nav-item.active .nav-icon { opacity: 1; }

.nav-pill, .nav-badge, .nav-link .badge {
    margin-left: auto;
    flex-shrink: 0;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #c0392b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
.nav-warn, .nav-dot-warn, .badge-warning {
    margin-left: auto;
    flex-shrink: 0;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #e67e22;
}

.sidebar-foot, .sidebar-footer, .sidebar-user {
    padding: 12px;
    border-top: 1px solid var(--sidebar-border);
    background: #1e242e;
}
.user-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.sidebar-user-info { min-width: 0; overflow: hidden; }
.user-name, .sidebar-user .name {
    font-size: 12px; font-weight: 600; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-role, .sidebar-user .role { font-size: 11px; color: #9aa0ab; white-space: nowrap; }
.sign-out, .link-quiet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none; border: none; padding: 0;
    font-size: 11px; color: #9aa0ab; cursor: pointer;
    font-family: inherit;
}
.sign-out-icon { display: none; width: 18px; height: 18px; }
.sign-out:hover, .link-quiet:hover { color: #fff; text-decoration: underline; }
.logout-form { display: contents; }
.btn-icon { background: none; border: none; color: var(--sidebar-text); cursor: pointer; }

/* Sidebar colapsada */
.app.sidebar-collapsed { --sidebar-w: var(--sidebar-w-collapsed); }
.app.sidebar-collapsed .brand-full,
.app.sidebar-collapsed .brand-sub,
.app.sidebar-collapsed .nav-label,
.app.sidebar-collapsed .nav-text,
.app.sidebar-collapsed .sidebar-user-info,
.app.sidebar-collapsed .sign-out-text { display: none; }
.app.sidebar-collapsed .brand-short { display: inline; }
.app.sidebar-collapsed .sidebar-brand-row {
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.app.sidebar-collapsed .brand-title { flex: 0; text-align: center; font-size: 16px; }
.app.sidebar-collapsed .nav-link,
.app.sidebar-collapsed .nav-item {
    justify-content: center;
    padding: 10px 0;
    margin: 2px 6px;
    gap: 0;
    border-left: none;
}
.app.sidebar-collapsed .nav-link.active,
.app.sidebar-collapsed .nav-item.active {
    box-shadow: inset 3px 0 0 #60a5fa;
    border-left: none;
}
.app.sidebar-collapsed .nav-pill {
    position: absolute;
    top: 3px;
    right: 3px;
    margin-left: 0;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    line-height: 14px;
}
.app.sidebar-collapsed .nav-warn {
    position: absolute;
    top: 6px;
    right: 6px;
    margin-left: 0;
}
.app.sidebar-collapsed .user-row { justify-content: center; margin-bottom: 8px; }
.app.sidebar-collapsed .sign-out {
    display: flex;
    justify-content: center;
    width: 100%;
    text-decoration: none;
}
.app.sidebar-collapsed .sign-out-icon { display: block; }
.app.sidebar-collapsed .sign-out:hover { text-decoration: none; opacity: 0.85; }

/* ── Topbar ── */
.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--line-light);
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 56px;
    box-shadow: var(--elevation-1);
}
.page-title, .topbar h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}
.page-subtitle, .topbar-subtitle { font-size: 12px; color: var(--muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    height: 32px; padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 12px; font-weight: 600;
    font-family: inherit;
    border: 1px solid var(--line);
    cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--surface-alt);
    color: var(--text-secondary);
}
.btn:hover { text-decoration: none; background: #eee; color: var(--text); }
.btn-primary {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue-dark);
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-outline { background: var(--surface); border-color: var(--line); color: var(--text-secondary); }
.btn-outline:hover { background: var(--surface-alt); }
.btn-success { background: var(--green); color: #fff; border-color: #245a32; }
.btn-success:hover { background: #245a32; color: #fff; }
.btn-warning { background: var(--orange); color: #fff; border-color: #6d3610; }
.btn-sm { height: 26px; padding: 0 8px; font-size: 11px; }
.btn-block { width: 100%; }

/* ── Panels / cards ── */
.panel, .card {
    background: var(--surface);
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    margin-bottom: 14px;
    box-shadow: var(--elevation-1);
}
.panel { overflow: hidden; }
.card { padding: 16px; }

.panel-head, .card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 16px;
    background: #eef0f3;
    border-bottom: 1px solid var(--line-light);
}
.panel-head h2, .card-header h3 { font-size: 13px; font-weight: 700; color: var(--text); }
.panel-link, .card-link { font-size: 12px; font-weight: 600; color: var(--blue); text-decoration: none; }
.panel-link:hover, .card-link:hover { text-decoration: underline; }

/* ── Stats ── */
.stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 16px;
    overflow: visible;
}
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 16px;
    overflow: visible;
}
.stat-box, .kpi-card {
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    box-shadow: var(--elevation-1);
    border-right: 1px solid var(--line-light);
    border-left: 4px solid var(--stat-accent, var(--blue));
}
.stat-box:nth-child(1) { --stat-accent: #1a5f9e; }
.stat-box:nth-child(2) { --stat-accent: #2563eb; }
.stat-box:nth-child(3) { --stat-accent: #16a34a; }
.stat-box:nth-child(4) { --stat-accent: #dc2626; }
.stat-box:nth-child(4) .stat-value { color: #dc2626; }
.kpi-card:nth-child(1) { --stat-accent: #1a5f9e; }
.kpi-card:nth-child(2) { --stat-accent: #16a34a; }
.kpi-card:nth-child(3) { --stat-accent: #dc2626; }
.stat-box:last-child, .kpi-card:last-child { border-right: 1px solid var(--line-light); }
.stat-label, .kpi-card .label {
    display: block;
    font-size: 11px; font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.stat-value, .kpi-card .value {
    display: block;
    font-size: 28px; font-weight: 800;
    color: var(--text);
    margin-top: 4px;
    font-variant-numeric: tabular-nums;
}
.kpi-card .trend, .kpi-icon { display: none !important; }

.grid-2, .dashboard-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.grid-2 .panel, .dashboard-grid .card { margin-bottom: 0; }

/* ── Tables ── */
.table-scroll, .table-wrap { overflow-x: auto; }
.table-scroll { padding: 0; }

.data-table, table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.data-table th, table thead th {
    text-align: left;
    padding: 9px 14px;
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e8eaee;
    border-bottom: 2px solid #b0b7c3;
    white-space: nowrap;
}
.data-table td, table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--line-light);
    color: var(--text);
    vertical-align: middle;
}
.data-table tbody tr:nth-child(even) td { background: #f9fafb; }
.data-table tbody tr:hover td, table tbody tr:hover td { background: #e8f0fe; }
.mono-link, .ref-link {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
    text-decoration: none;
}
.mono-link:hover, .ref-link:hover { text-decoration: underline; }

.tech-row, .tech-cell { display: inline-flex; align-items: center; gap: 6px; }
.muted, .unassigned, .text-muted { color: var(--muted); font-size: 12px; }
.unassigned { font-style: italic; }

/* ── Status & priority ── */
.status-chip, .badge {
    display: inline-block;
    height: auto;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid;
    line-height: 1.35;
}
.status-chip-dot, .status-chip__dot { display: none; }

.status-pendente, .badge-yellow { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
.status-em_progresso, .badge-blue { background: #dbeafe; color: #1e40af; border-color: #60a5fa; }
.status-aguarda_pecas, .badge-orange { background: #ffedd5; color: #9a3412; border-color: #fb923c; }
.status-concluido, .badge-green { background: #dcfce7; color: #166534; border-color: #4ade80; }
.status-urgente, .badge-red { background: #fee2e2; color: #991b1b; border-color: #f87171; }

.priority-chip, .priority-low, .priority-normal, .priority-high, .priority-urgent {
    display: inline-block;
    padding: 2px 9px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--line-light);
    background: #f3f4f6;
    color: var(--text-secondary);
}
.priority-alta, .priority-high { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
.priority-urgente { background: #fee2e2; color: #991b1b; border-color: #f87171; }

/* ── Activity feed ── */
.feed, .activity-list { list-style: none; padding: 4px 14px 8px; }
.feed-item, .activity-item {
    display: flex; gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-light);
}
.feed-item:last-child, .activity-item:last-child { border-bottom: none; }
.feed-text, .activity-body .desc { font-size: 12px; color: var(--text); line-height: 1.4; }
.feed-meta, .activity-body .meta { font-size: 11px; color: var(--muted); margin-top: 1px; }

.activity-dot {
    width: 8px; height: 8px; border-radius: 50%;
    margin-top: 5px; flex-shrink: 0;
    background: var(--line);
    box-shadow: 0 0 0 2px #fff;
}
.activity-dot--success { background: var(--green); }
.activity-dot--sync { background: var(--blue); }
.activity-dot--assign { background: #5a4a8a; }
.activity-dot--urgent { background: var(--red); }
.activity-dot--note { background: var(--muted); }
.activity-icon { display: none; }

/* ── Avatars ── */
.avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: #dbeafe;
    border: 2px solid #fff;
    color: #1e40af;
    font-size: 10px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px var(--line-light);
}
.avatar.sm, .avatar-sm { width: 24px; height: 24px; font-size: 9px; }
.avatar-blue, .avatar-pink, .avatar-green { background: #dbeafe; color: #1e40af; }

/* ── Tech workload ── */
.tech-grid, .workload-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px 14px;
}
.tech-card, .workload-card {
    padding: 14px 16px;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--elevation-1);
}
.tech-card strong, .workload-card .name { font-size: 13px; font-weight: 700; }
.tech-card .muted, .workload-card .stats { font-size: 11px; margin: 5px 0 10px; color: var(--muted); }
.bar, .progress-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; }
.bar span, .progress-fill, .progress-blue, .progress-pink, .progress-green {
    display: block; height: 100%; background: #2563eb;
    border-radius: 3px;
}

/* ── Tabs ── */
.tabs {
    display: flex; flex-wrap: wrap; gap: 4px;
    margin-bottom: 12px;
    padding: 4px;
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--elevation-1);
}
.tab {
    padding: 7px 14px;
    font-size: 12px; font-weight: 500; color: var(--muted);
    border-bottom: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border-right: none;
}
.tab:hover { color: var(--text); background: #eef0f3; text-decoration: none; }
.tab.active { color: #fff; background: var(--blue); font-weight: 600; }
.tab-danger.active { color: #fff; background: #dc2626; }

/* ── Forms ── */
.filters-card { margin-bottom: 10px; }
.filters-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 6px; align-items: center;
}
.input, .select {
    width: 100%; height: 30px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 12px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
}
textarea.input { height: auto; padding: 6px 8px; min-height: 72px; resize: vertical; }
.input:focus, .select:focus { outline: 1px solid var(--blue); border-color: var(--blue); }
.field span { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 3px; }
.settings-form { display: flex; flex-direction: column; gap: 12px; }
.toggle-field { display: flex; align-items: center; gap: 6px; font-size: 12px; }

/* ── Detail page ── */
.breadcrumb { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: flex; gap: 4px; flex-wrap: wrap; }
.breadcrumb a { color: var(--blue); font-weight: 500; text-decoration: none; }
.topbar-badges { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 12px;
    align-items: start;
}

.panel-record, .summary-card {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: var(--radius);
    margin-bottom: 12px;
}
.card-dark { background: var(--surface) !important; color: var(--text) !important; border-color: var(--line) !important; }
.summary-card h2, .panel-record h2 { font-family: var(--mono); font-size: 16px; font-weight: 600; color: var(--text) !important; }
.summary-top { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.summary-badges { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.artsoft-id { font-family: var(--mono); font-size: 11px; color: var(--muted); }

.summary-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--line-light);
}
.summary-meta span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.summary-meta strong { font-size: 12px; font-weight: 600; color: var(--text) !important; }

.section-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line-light); }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.info-grid span { display: block; font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.info-grid strong { font-size: 12px; font-weight: 500; }
.problem-text { color: var(--text-secondary); line-height: 1.55; font-size: 12px; }

.timer-card { text-align: center; padding: 14px; }
.timer-card h3 { font-size: 10px; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; }
.timer-display { font-family: var(--mono); font-size: 22px; font-weight: 600; color: var(--text) !important; margin-bottom: 10px; }
.timer-actions { display: flex; gap: 6px; justify-content: center; }
.timer-actions form { display: inline; }
.timer-mono { font-family: var(--mono); }

.timeline { list-style: none; }
.timeline li { position: relative; padding: 0 0 10px 18px; font-size: 12px; color: var(--muted); }
.timeline li::before { content: ''; position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.timeline li.done { color: var(--text); font-weight: 500; }
.timeline li.done::before { border-color: var(--green); background: var(--green); }
.timeline li.active { color: var(--blue); font-weight: 600; }
.timeline li.active::before { border-color: var(--blue); background: var(--blue); }

.detail-list div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line-light); font-size: 12px; gap: 10px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { font-weight: 600; text-align: right; }

.notes-list { margin-bottom: 10px; }
.note-item { padding: 10px 0; border-bottom: 1px solid var(--line-light); }
.note-header { display: flex; justify-content: space-between; margin-bottom: 3px; }
.note-time { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.note-form { display: flex; flex-direction: column; gap: 6px; }
.action-stack, .inline-form { display: flex; flex-direction: column; gap: 6px; }
.inline-form-row { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ── Alerts ── */
.alert { padding: 8px 12px; border-radius: var(--radius); margin-bottom: 10px; font-size: 12px; border: 1px solid; }
.alert-success { background: var(--green-bg); color: var(--green); border-color: #a0c8a8; }
.alert-success-banner {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 14px; margin-bottom: 12px;
    background: var(--green-bg); border: 1px solid #a0c8a8; border-radius: var(--radius);
}
.alert-success-banner p { font-size: 11px; color: var(--green); margin-top: 2px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--green); }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.sla-overdue { color: var(--red); font-weight: 600; }
.sla-warning { color: var(--amber); font-weight: 600; }
.sla-ok { color: var(--green); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.cell-sub { font-size: 10px; color: var(--muted); margin-top: 1px; }
.row-urgent td { background: #fdf5f5 !important; }
.empty-cell { text-align: center; color: var(--muted); padding: 24px !important; font-style: italic; }

/* ── Pagination ── */
.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-size: 11px; color: var(--muted); border-top: 1px solid var(--line-light); }
.pagination { display: flex; gap: 2px; }
.page-btn {
    min-width: 26px; height: 26px; padding: 0 6px;
    border: 1px solid var(--line); border-radius: var(--radius);
    font-size: 11px; background: var(--surface);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--text-secondary); text-decoration: none;
}
.page-btn:hover { background: var(--surface-alt); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue-dark); }
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* ── Notifications ── */
.notifications-wrap { position: relative; }
.icon-btn {
    width: 30px; height: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-secondary); position: relative;
}
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn .dot { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 1px solid #fff; }
.notifications-panel {
    position: absolute; right: 0; top: calc(100% + 2px);
    width: 300px; background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 2px 4px 12px rgba(0,0,0,.15);
    z-index: 100;
}
.notifications-header { padding: 8px 12px; font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line-light); background: var(--surface-alt); }
.notifications-list { list-style: none; max-height: 260px; overflow-y: auto; }
.notifications-list li { padding: 8px 12px; border-bottom: 1px solid var(--line-light); }
.notifications-list .desc { font-size: 12px; }
.notifications-list .meta { font-size: 10px; color: var(--muted); margin-top: 1px; }
.notifications-footer { display: block; padding: 8px 12px; text-align: center; font-size: 11px; font-weight: 600; color: var(--blue); border-top: 1px solid var(--line-light); text-decoration: none; background: var(--surface-alt); }
.notifications-footer:hover { background: #eee; }

/* ── Stats / reports ── */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.stats-grid span { display: block; font-size: 10px; color: var(--muted); }
.stats-grid strong { font-size: 16px; font-weight: 700; }
.workload-detail-card { padding: 14px; }
.report-list { list-style: none; }
.report-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-light); font-size: 12px; }
.report-count { font-weight: 700; }

/* ── Login ── */
.login-page {
    min-height: 100vh;
    display: flex;
    background: var(--page-bg);
}
.login-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}
.login-panel-left {
    width: 340px;
    flex-shrink: 0;
    background: var(--header-bg);
    color: #fff;
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-panel-left h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 4px;
}
.login-panel-left .login-company {
    font-size: 14px;
    font-weight: 400;
    opacity: 0.85;
    margin-bottom: 24px;
}
.login-panel-left .login-tagline {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.75;
    border-top: 1px solid rgba(255,255,255,.25);
    padding-top: 20px;
}
.login-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--elevation-2);
}
.login-brand { margin-bottom: 20px; }
.login-brand h1 { font-size: 16px; font-weight: 600; color: var(--text); }
.login-brand p { font-size: 12px; color: var(--muted); margin-top: 2px; }
.login-hint {
    margin-top: 16px; padding: 8px 10px;
    background: var(--surface-alt);
    border: 1px solid var(--line-light);
    border-radius: var(--radius);
    font-size: 11px; color: var(--muted); line-height: 1.5;
}
.flash-error {
    background: var(--red-bg); color: var(--red);
    padding: 8px 10px; border-radius: var(--radius);
    margin-bottom: 12px; font-size: 12px;
    border: 1px solid #d4a0a0;
}

/* ── Parts / stock ── */
.parts-stats { margin-bottom: 14px; }

.parts-layout {
    display: block;
}
.parts-layout--with-form {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 14px;
    align-items: start;
}
.parts-main .panel { margin-bottom: 0; }
.parts-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}
.parts-filters {
    padding: 12px 16px;
    border-bottom: 1px solid var(--line-light);
    background: var(--surface);
}
.parts-filters-form {
    grid-template-columns: 1.5fr 1fr 1fr auto;
}
.parts-table .part-name-cell strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.part-desc {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: var(--muted);
    line-height: 1.35;
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.part-sku {
    font-family: var(--mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--blue);
}
.stock-qty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 24px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.stock-ok { background: var(--green-bg); color: var(--green); border: 1px solid #86efac; }
.stock-empty { background: var(--red-bg); color: var(--red); border: 1px solid #fca5a5; }
.part-location {
    display: inline-block;
    padding: 2px 8px;
    background: #f3f4f6;
    border: 1px solid var(--line-light);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}
.row-out-of-stock td { background: #fef8f8; }
.row-out-of-stock:hover td { background: #fde8e8 !important; }

.parts-aside {
    position: sticky;
    top: 14px;
}
.parts-form-panel { margin-bottom: 0; }
.parts-form-body { padding: 16px; }
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.parts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.part-card { padding: 12px; }
.part-card-top { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 4px; }
.part-meta, .part-stock { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }

.expedition-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.expedition-group { margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-light); }
.checkbox-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 12px; }
.expedition-doc-header { display: flex; justify-content: space-between; gap: 12px; }
.expedition-codes span { font-size: 10px; color: var(--muted); text-transform: uppercase; }
.expedition-codes strong { font-family: var(--mono); font-size: 12px; }
.barcode-placeholder {
    font-family: var(--mono); font-size: 13px; letter-spacing: 2px;
    padding: 14px; background: var(--surface-alt);
    text-align: center; border: 1px dashed var(--line);
    border-radius: var(--radius);
}

.wizard-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.wizard-option {
    display: flex; align-items: center; gap: 6px;
    padding: 10px; border: 1px solid var(--line-light);
    border-radius: var(--radius); cursor: pointer; font-size: 12px;
}
.wizard-option:has(input:checked) { border-color: var(--blue); background: var(--blue-light); }

.technical-report { white-space: pre-wrap; font-family: var(--mono); font-size: 11px; line-height: 1.6; color: var(--text-secondary); }
.simple-list { list-style: none; font-size: 12px; }
.form-hint { font-size: 10px; color: var(--muted); margin-top: 3px; }

/* ── Responsive ── */
@media (max-width: 1100px) {
    .grid-2, .dashboard-grid { grid-template-columns: 1fr; }
    .tech-grid, .workload-grid { grid-template-columns: 1fr; }
    .parts-layout--with-form { grid-template-columns: 1fr; }
    .parts-form-panel { margin-bottom: 14px; }
}
@media (max-width: 768px) {
    .sidebar { display: none; }
    .stat-row, .kpi-grid { grid-template-columns: 1fr 1fr; }
    .stat-box:nth-child(2), .kpi-card:nth-child(2) { border-right: none; }
    .detail-grid { grid-template-columns: 1fr; }
    .filters-form { grid-template-columns: 1fr; }
    .parts-filters-form { grid-template-columns: 1fr; }
    .page, .content { padding: 12px; }
    .expedition-layout { grid-template-columns: 1fr; }
    .login-split { flex-direction: column; }
    .login-panel-left { width: 100%; padding: 28px 24px; }
}
@media print {
    .sidebar, .topbar, .btn { display: none !important; }
    .page, .content { padding: 0; }
}
