

:root {
    --bg: #f5f6fa;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
}

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

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--sidebar-bg) 0%, var(--primary) 100%);
}

.auth-container {
    width: 420px;
    max-width: 95vw;
}

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
    color: white;
}

.logo-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 12px;
    display: block;
}

.logo-sm {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    margin-bottom: 0;
}

.auth-logo h1 { font-size: 1.5em; font-weight: 700; }
.auth-subtitle { opacity: 0.85; font-size: 0.95em; margin-top: 4px; }

.auth-form {
    background: white;
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.auth-form h2 { font-size: 1.2em; margin-bottom: 20px; }

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 13px;
}

.auth-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px;
    color: rgba(255,255,255,0.85);
    font-size: 13px;
}

.onboarding-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.onboarding-container {
    width: 680px;
    max-width: 95vw;
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.onboarding-header {
    text-align: center;
    margin-bottom: 32px;
}

.onboarding-header h2 { margin: 12px 0 20px; }

.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
}

.progress-step.active { background: var(--primary); color: white; }
.progress-step.done { background: var(--success); color: white; }

.progress-line {
    width: 60px;
    height: 3px;
    background: var(--border);
}

.onboarding-step h3 { font-size: 1.3em; margin-bottom: 8px; }
.onboarding-step > p { color: var(--text-secondary); margin-bottom: 24px; }

.category-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.category-card:hover { border-color: var(--primary); background: var(--primary-light); }
.category-card.selected { border-color: var(--primary); background: var(--primary-light); }
.cat-icon { font-size: 2em; margin-bottom: 8px; }
.cat-name { font-weight: 600; }
.cat-desc { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.checklist { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.check-item:hover { background: #fafafa; }

.check-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 14px;
    flex-shrink: 0;
    transition: all 0.2s;
}

.check-box.checked {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.check-content { flex: 1; }
.check-title { font-weight: 600; }
.check-desc { font-size: 12px; color: var(--text-secondary); }
.check-link { font-size: 13px; flex-shrink: 0; }
.check-status { font-size: 13px; flex-shrink: 0; }
.check-status.success { color: var(--success); }

.onboarding-buttons { display: flex; justify-content: space-between; margin-top: 24px; }
.onboarding-skip { text-align: center; margin-top: 16px; font-size: 13px; }

.cert-select-area { margin-bottom: 20px; }

.cert-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    background: var(--primary-light);
}

.cert-icon { font-size: 2em; }
.cert-info { flex: 1; }
.cert-name { font-weight: 700; font-size: 1.05em; }
.cert-details { font-size: 12px; color: var(--text-secondary); display: flex; gap: 16px; margin-top: 4px; }
.cert-issuer { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.cert-status { font-size: 13px; font-weight: 600; }

.connect-ukep-sim { margin-top: 16px; }

.sim-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-top: 12px;
}

.success-msg {
    background: var(--success-light);
    color: var(--success);
    padding: 16px;
    border-radius: var(--radius);
    margin-top: 12px;
    font-weight: 500;
}

.info-callout {
    display: flex;
    gap: 12px;
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: var(--radius);
    padding: 14px 16px;
}

.callout-icon { font-size: 1.3em; flex-shrink: 0; }
.callout-text { font-size: 0.92em; line-height: 1.5; color: var(--text); }
.callout-text strong { color: var(--sidebar-bg); }

.oms-connect-area .form-hint {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 4px;
}

.onboard-done-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.done-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05em;
}

.done-icon { font-size: 1.3em; }

.app-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-title { font-weight: 700; font-size: 1.05em; }

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.nav-item:hover { background: var(--sidebar-active); text-decoration: none; }
.nav-item.active { background: var(--sidebar-active); font-weight: 600; }
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 4px;
    bottom: 4px;
    width: 3px;
    background: white;
    border-radius: 0 2px 2px 0;
}

.nav-icon { font-size: 1.1em; width: 24px; text-align: center; }
.nav-text { flex: 1; }

.nav-badge {
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.nav-badge.warn { background: var(--warning); }

.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 8px 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin-top: 4px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 11px; opacity: 0.7; }

.btn-icon {
    background: none;
    border: none;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    opacity: 0.7;
}
.btn-icon:hover { opacity: 1; }

.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h2 { font-size: 1.2em; }

.topbar-actions { display: flex; align-items: center; gap: 16px; }

.ukep-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius);
    background: var(--success-light);
    color: var(--success);
}

.ukep-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.ukep-dot.green { background: var(--success); }
.ukep-dot.red { background: var(--danger); }

.sync-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: white;
    transition: background 0.2s;
}
.sync-btn:hover { background: #f5f5f5; }

.page { padding: 24px 32px; }

.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.widget {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

.widget:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.widget-icon { font-size: 1.5em; margin-bottom: 8px; }
.widget-value { font-size: 1.8em; font-weight: 700; }
.widget-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.widget-green { border-left: 4px solid var(--success); }
.widget-yellow { border-left: 4px solid var(--warning); }
.widget-red { border-left: 4px solid var(--danger); }

.section-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.section-card h3 { font-size: 1.05em; margin-bottom: 16px; }

.alert-list { display: flex; flex-direction: column; gap: 8px; }

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.2s;
}

.alert-warning { background: var(--warning-light); }
.alert-danger { background: var(--danger-light); }
.alert-error { background: #fce4ec; }

.alert-icon { font-size: 1.3em; }
.alert-text { flex: 1; }
.alert-text strong { display: block; font-size: 0.95em; }
.alert-text span { font-size: 12px; color: var(--text-secondary); }
.alert-action { font-size: 13px; color: var(--primary); white-space: nowrap; }

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

.action-card:hover { border-color: var(--primary); background: var(--primary-light); }
.action-icon { font-size: 1.5em; }

.activity-list { display: flex; flex-direction: column; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.activity-item:last-child { border-bottom: none; }
.activity-time { color: var(--text-secondary); font-size: 12px; min-width: 120px; }
.activity-text { flex: 1; }

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.form-group textarea { resize: vertical; }

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

.auto-hint { font-size: 11px; color: var(--primary); font-weight: 400; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: #f5f5f5; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #eee; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #1b5e20; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #e65100; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #b71c1c; }
.btn-full { width: 100%; }
.btn-sm { padding: 4px 12px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.data-table-wrap { overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: #f8f9fa;
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
}

.data-table tbody tr:hover { background: #fafafa; }
.data-table tfoot td { font-weight: 600; background: #f8f9fa; }

.row-highlight { background: var(--warning-light) !important; }
.row-highlight:hover { background: #fff3cd !important; }

.data-table input[type="checkbox"] { cursor: pointer; }

.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-success { background: var(--success-light); color: var(--success); }
.status-error { background: var(--danger-light); color: var(--danger); }
.status-pending { background: var(--warning-light); color: var(--warning); }
.status-info { background: var(--primary-light); color: var(--primary); }
.status-neutral { background: #f5f5f5; color: var(--text-secondary); }

.page-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-bar { flex: 1; min-width: 200px; }
.search-bar input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
}
.search-bar input:focus { outline: none; border-color: var(--primary); }

.filter-group { display: flex; gap: 8px; align-items: center; }
.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
}

.codes-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.code-stat {
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}

.print-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.print-controls {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.print-controls h3 { margin-bottom: 16px; }

.template-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.template-card {
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.template-card:hover { border-color: var(--primary); }
.template-card.selected { border-color: var(--primary); background: var(--primary-light); }
.tmpl-icon { font-size: 1.5em; }
.tmpl-name { font-size: 12px; font-weight: 600; }
.tmpl-desc { font-size: 11px; color: var(--text-secondary); }

.print-select-all { margin-top: 4px; }
.print-select-all label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }

.print-preview {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.print-preview h3 { margin-bottom: 16px; }

.preview-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background: #f8f8f8;
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.label-preview {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.label-datamatrix { width: 80px; height: 80px; flex-shrink: 0; }
.label-datamatrix svg { width: 100%; height: 100%; }

.label-text { flex: 1; }
.label-name { font-size: 12px; font-weight: 600; }
.label-gtin { font-size: 11px; color: var(--text-secondary); font-family: monospace; }
.label-volume { font-size: 11px; color: var(--text-secondary); }

.edo-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 10px 24px;
    background: none;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-family: inherit;
}

.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-badge {
    background: var(--warning);
    color: white;
    font-size: 11px;
    padding: 1px 6px;
    border-radius: 8px;
    margin-left: 4px;
}

.journal-timeline { padding: 0; }

.journal-day { margin-bottom: 20px; }
.journal-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.journal-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
}

.journal-time { color: var(--text-secondary); min-width: 50px; font-family: monospace; }
.journal-icon { font-size: 1.1em; }
.journal-text { flex: 1; }
.journal-status { font-size: 12px; }

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

.ukep-info-card {
    padding: 16px;
    background: var(--success-light);
    border-radius: var(--radius);
    margin-bottom: 16px;
}

.ukep-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ukep-details { font-size: 13px; line-height: 1.8; }
.ukep-jwt { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

.toggle-row span:first-child { font-size: 13px; }

.notif-settings { margin-bottom: 8px; }

.tg-connect { text-align: center; padding: 20px 0; }
.tg-connect p { color: var(--text-secondary); margin-bottom: 16px; }
.tg-code {
    font-size: 2em;
    font-weight: 700;
    letter-spacing: 4px;
    color: var(--primary);
    margin: 16px 0;
    font-family: monospace;
}

.billing-current { margin-bottom: 24px; }

.current-plan { text-align: center; }
.plan-name-big { font-size: 2em; font-weight: 700; color: var(--primary); }
.plan-usage { margin-top: 16px; }

.usage-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.usage-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s;
}

.usage-text { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.pricing-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid transparent;
    position: relative;
}

.pricing-popular { border-color: var(--primary); }

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 2px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-name { font-size: 1.2em; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 1.8em; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.pricing-price span { font-size: 0.5em; font-weight: 400; color: var(--text-secondary); }

.pricing-features {
    list-style: none;
    margin-bottom: 20px;
    text-align: left;
}

.pricing-features li {
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-features li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: 700;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal {
    background: white;
    border-radius: var(--radius);
    width: 520px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.2s;
}

.modal-lg { width: 720px; }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1.1em; }

.modal-close {
    background: none;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
}

.modal-close:hover { color: var(--text); }

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

.order-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 8px;
}

.order-product-row label { flex: 1; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.order-product-row input[type="number"] {
    width: 100px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 13px;
}

.order-summary {
    margin-top: 16px;
    padding: 12px;
    background: var(--primary-light);
    border-radius: 6px;
    text-align: center;
}

.codes-checklist { display: flex; flex-direction: column; gap: 8px; }
.code-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}
.code-check:hover { background: #fafafa; }

.inn-search { position: relative; }
.inn-result {
    padding: 12px;
    background: var(--success-light);
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
}

.upd-total {
    text-align: right;
    padding: 12px 0;
    font-size: 1.1em;
}

.upd-detail-info { margin-bottom: 20px; }
.detail-row { padding: 4px 0; font-size: 13px; }
.detail-row span { color: var(--text-secondary); }

.import-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.import-dropzone:hover { border-color: var(--primary); }
.dropzone-icon { font-size: 2em; margin-bottom: 8px; }
.dropzone-hint { font-size: 12px; color: var(--text-secondary); margin-top: 8px; }

.signing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.signing-modal {
    background: white;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    width: 400px;
    max-width: 90vw;
}

.signing-icon { font-size: 3em; margin-bottom: 16px; }
.signing-modal h3 { margin-bottom: 24px; }

.signing-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 13px;
    justify-content: center;
}

.signing-step.done { color: var(--success); }
.signing-step.done .spinner { display: none; }
.signing-step.done::before { content: '✅ '; }

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
    max-width: 400px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 16px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 13px;
}

.page-btn:hover { background: #f5f5f5; }
.page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

.workflow-card { position: relative; }
.workflow-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.workflow-header h3 { margin-bottom: 0; }
.workflow-toggle { display: flex; gap: 8px; }
.workflow-subtitle { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

.workflow-pipeline {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 8px;
}

.wf-step {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.wf-step:hover { background: #f8f9fa; }

.wf-connector {
    position: absolute;
    top: 28px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.wf-step:first-child .wf-connector { display: none; }
.wf-done .wf-connector { background: var(--success); }
.wf-current .wf-connector { background: linear-gradient(to right, var(--success), var(--primary)); }

.wf-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    z-index: 1;
    background: var(--border);
    color: var(--text-secondary);
    transition: all 0.3s;
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--border);
}

.wf-done .wf-circle {
    background: var(--success);
    color: white;
    box-shadow: 0 0 0 2px var(--success);
}

.wf-current .wf-circle {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(21, 101, 192, 0.2);
    animation: wfPulse 2s ease-in-out infinite;
}

@keyframes wfPulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 6px rgba(21, 101, 192, 0.2); }
    50% { box-shadow: 0 0 0 2px var(--primary), 0 0 0 10px rgba(21, 101, 192, 0.1); }
}

.wf-locked .wf-circle {
    background: #f0f0f0;
    color: #bbb;
    box-shadow: 0 0 0 2px #e0e0e0;
}

.wf-body {
    text-align: center;
    margin-top: 10px;
}

.wf-num {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.wf-current .wf-num { color: var(--primary); }

.wf-title {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}

.wf-locked .wf-title { color: #bbb; }

.wf-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

.wf-locked .wf-desc { color: #ccc; }

.wf-body .btn { margin-top: 8px; }

.wf-detail {
    margin-top: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    background: #fafbfc;
    animation: slideUp 0.2s;
}

.wf-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wf-detail-header h4 { margin: 0; font-size: 1.05em; }

.wf-detail-content { font-size: 13px; line-height: 1.7; }
.wf-detail-content ol { margin: 8px 0 8px 20px; }
.wf-detail-content li { margin-bottom: 6px; }
.wf-detail-content .wf-warning { color: var(--warning); font-weight: 500; }
.wf-detail-content .wf-tip { color: var(--success); font-style: italic; }
.wf-detail-actions { margin-top: 16px; display: flex; gap: 8px; }

.ctx-help {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e8f0fe 100%);
    border: 1px solid #bbdefb;
    border-left: 4px solid var(--primary);
    border-radius: var(--radius);
    margin-bottom: 20px;
    position: relative;
}

.ctx-help-step {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 2px;
}

.ctx-help-body { flex: 1; }

.ctx-help-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.ctx-help-text p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

.ctx-help-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
}

.ctx-prev, .ctx-next {
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
}

.ctx-prev:hover, .ctx-next:hover { text-decoration: underline; }
.ctx-done { color: var(--success); cursor: default; }
.ctx-done:hover { text-decoration: none; }

.ctx-help-close {
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 4px;
    flex-shrink: 0;
}

.ctx-help-close:hover { color: var(--text); }

.prep-checklist-card { margin-bottom: 24px; }

.prep-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
}

.prep-header h3 { margin-bottom: 2px; }

.prep-badge {
    font-size: 12px;
    font-weight: 600;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 8px;
}

.prep-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.prep-steps { display: flex; flex-direction: column; gap: 0; }

.prep-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 0;
    margin-bottom: -1px;
    position: relative;
    transition: background 0.2s;
}

.prep-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.prep-item:last-child { border-radius: 0 0 var(--radius) var(--radius); margin-bottom: 0; }
.prep-item:hover { background: #fafbfc; }

.prep-check {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s;
    margin-top: 2px;
}

.prep-check.done {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.prep-check:not(.done):hover {
    border-color: var(--primary);
}

.prep-body { flex: 1; min-width: 0; }
.prep-title { font-weight: 600; font-size: 14px; }

.prep-item:has(.prep-check.done) .prep-title {
    color: var(--text-secondary);
}

.prep-desc-short { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.prep-expanded {
    margin-top: 12px;
    animation: slideUp 0.2s;
}

.prep-instructions {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 16px;
    font-size: 13px;
    line-height: 1.7;
}

.prep-instructions ol {
    margin: 6px 0 6px 20px;
}

.prep-instructions li { margin-bottom: 4px; }

.prep-instructions p { margin-bottom: 8px; }
.prep-instructions p:last-child { margin-bottom: 0; }

.prep-warning {
    color: var(--warning);
    font-weight: 500;
}

.prep-tip {
    color: var(--success);
    font-style: italic;
}

.prep-item > .btn {
    flex-shrink: 0;
    margin-top: 4px;
}

.prep-footer {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.prep-progress { flex: 1; }

.prep-progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
}

.prep-progress-fill {
    height: 100%;
    background: var(--success);
    border-radius: 3px;
    transition: width 0.5s;
}

#prep-progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}
