/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --orange:      #F05A28;
    --orange-dark: #C94417;
    --navy:        #1C2B4A;
    --blue:        #3D5273;
    --blue-light:  #EEF2F8;
    --gray-50:     #f8fafc;
    --gray-100:    #f1f5f9;
    --gray-200:    #e2e8f0;
    --gray-400:    #94a3b8;
    --gray-600:    #475569;
    --gray-800:    #1e293b;
    --white:       #ffffff;
    --success:     #16a34a;
    --error:       #dc2626;
    --warning:     #d97706;
    --radius:      10px;
    --shadow:      0 2px 12px rgba(0,0,0,0.08);
    --header-h:    56px;
}

html, body { height: 100%; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: var(--gray-800); background: var(--gray-50); }

/* ── App header ───────────────────────────────────────────────────────────── */
.app-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    height: var(--header-h);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
    background: var(--navy);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-left  { display: flex; align-items: center; gap: 10px; }
.header-back  { color: var(--gray-400); text-decoration: none; font-size: 13px; margin-right: 4px; }
.header-back:hover { color: var(--white); }
.logo-mark    { font-size: 22px; line-height: 1; }
.app-title    { color: var(--white); font-weight: 600; font-size: 16px; letter-spacing: -0.01em; }

.header-nav   { display: flex; align-items: center; gap: 16px; }
.nav-link     { color: var(--gray-400); text-decoration: none; font-size: 13px; transition: color 0.15s; }
.nav-link:hover { color: var(--white); }
.nav-logout   { color: var(--orange); }
.nav-logout:hover { color: #ff7b52; }

.user-pill {
    display: flex; align-items: center; gap: 6px;
    color: var(--gray-400); font-size: 13px;
}

/* ── Role badges ──────────────────────────────────────────────────────────── */
.role-badge {
    display: inline-block; font-size: 10px; font-weight: 700;
    padding: 2px 7px; border-radius: 20px; letter-spacing: 0.03em;
    text-transform: uppercase;
}
.role-steward       { background: var(--blue-light); color: var(--blue); }
.role-approver     { background: #fef3c7; color: #92400e; }
.role-manager      { background: #fde8df; color: var(--orange-dark); }
.role-admin { background: var(--orange); color: var(--white); }

/* ── App content layout ───────────────────────────────────────────────────── */
body.app-mode { overflow-y: auto; }
.app-content  { padding-top: var(--header-h); min-height: 100vh; }

/* ── Login page ───────────────────────────────────────────────────────────── */
body.login-mode {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy) 0%, #2d4a7a 100%);
}

.login-page  { width: 100%; max-width: 420px; padding: 20px; }

.login-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    padding: 40px 36px;
}

.login-header { text-align: center; margin-bottom: 28px; }
.login-logo   { font-size: 48px; display: block; margin-bottom: 12px; }

.login-header h1 {
    font-size: 22px; font-weight: 700;
    color: var(--navy); line-height: 1.2;
}

.login-subtitle {
    margin-top: 6px; font-size: 13px; color: var(--gray-600);
}

/* ── Forms ────────────────────────────────────────────────────────────────── */
.auth-view h2 { font-size: 17px; color: var(--navy); margin-bottom: 16px; }

.field-group       { margin-bottom: 16px; }
.field-group label { display: block; font-size: 12px; font-weight: 600; color: var(--gray-600); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.04em; }
.optional          { font-weight: 400; text-transform: none; letter-spacing: 0; }

.field-group input {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 14px; color: var(--gray-800);
    transition: border-color 0.15s, box-shadow 0.15s;
    background: var(--white);
}
.field-group input:focus {
    outline: none; border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(240,90,40,0.15);
}

.btn-primary {
    width: 100%; padding: 11px;
    background: var(--orange); color: var(--white);
    border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: background 0.15s;
    margin-top: 4px;
}
.btn-primary:hover    { background: var(--orange-dark); }
.btn-primary:disabled { background: var(--gray-400); cursor: not-allowed; }

.auth-links {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 18px; font-size: 13px; color: var(--gray-600);
}
.divider { color: var(--gray-400); }

.link-btn {
    background: none; border: none; cursor: pointer;
    color: var(--orange); font-size: 13px; padding: 0;
    text-decoration: underline;
}
.link-btn:hover { color: var(--orange-dark); }

.back-link { display: block; margin-top: 14px; }

.form-hint { font-size: 13px; color: var(--gray-600); margin-bottom: 16px; }

.form-error {
    background: #fef2f2; border: 1px solid #fecaca;
    color: var(--error); border-radius: 8px;
    padding: 10px 12px; font-size: 13px; margin-bottom: 14px;
}

.form-msg {
    border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px;
}
.form-msg.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--success); }
.form-msg.error   { background: #fef2f2; border: 1px solid #fecaca; color: var(--error); }

/* ── Admin layout ─────────────────────────────────────────────────────────── */
body.admin-mode { overflow-y: auto; }

.admin-main {
    max-width: 1200px; margin: 0 auto;
    padding: calc(var(--header-h) + 28px) 24px 48px;
}

.admin-tabs {
    display: flex; gap: 4px; margin-bottom: 24px;
    border-bottom: 2px solid var(--gray-200);
}

.tab-btn {
    padding: 10px 20px; border: none; background: none; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--gray-600);
    border-bottom: 3px solid transparent; margin-bottom: -2px;
    transition: color 0.15s, border-color 0.15s;
}
.tab-btn.active, .tab-btn:hover { color: var(--orange); }
.tab-btn.active { border-bottom-color: var(--orange); }

.admin-section { }

.section-header {
    display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.section-header h2 { font-size: 18px; font-weight: 700; color: var(--navy); }

.pending-count {
    background: var(--orange); color: var(--white);
    font-size: 11px; font-weight: 700; padding: 2px 9px;
    border-radius: 20px;
}

/* ── Data table ───────────────────────────────────────────────────────────── */
.data-table {
    width: 100%; border-collapse: collapse;
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
    margin-bottom: 32px;
}
.data-table th {
    padding: 11px 14px; background: var(--navy);
    color: var(--white); font-size: 12px; font-weight: 600;
    text-align: left; text-transform: uppercase; letter-spacing: 0.04em;
}
.data-table td   { padding: 10px 14px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--gray-50); }
.data-table tr.row-pending td { background: #fff8f3; }

.date-cell { color: var(--gray-600); font-size: 12px; }

.inline-select {
    padding: 4px 8px; border: 1px solid var(--gray-200); border-radius: 6px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    background: var(--white); color: var(--gray-800);
}
.inline-select.status-approved { color: var(--success); border-color: #bbf7d0; background: #f0fdf4; }
.inline-select.status-pending  { color: var(--warning); border-color: #fde68a; background: #fffbeb; }
.inline-select.status-suspended{ color: var(--error);   border-color: #fecaca; background: #fef2f2; }

/* ── Analytics ────────────────────────────────────────────────────────────── */
.stat-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
    margin-bottom: 28px;
}
@media (max-width: 768px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px 24px;
    border-left: 4px solid var(--orange);
}
.stat-value { font-size: 32px; font-weight: 700; color: var(--navy); }
.stat-label { font-size: 12px; color: var(--gray-600); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }

.charts-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px;
    margin-bottom: 20px;
}
.charts-grid.single { grid-template-columns: 1fr; }
@media (max-width: 768px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px;
}
.chart-card h3 { font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 14px; }

/* ── Utilities ────────────────────────────────────────────────────────────── */
.loading-msg { color: var(--gray-600); font-size: 14px; padding: 16px 0; }
.section-divider { border: none; border-top: 1px solid var(--gray-200); margin: 24px 0; }

/* ── Loading / error screens ──────────────────────────────────────────────── */
#app-loading, #app-error {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: calc(100vh - var(--header-h)); padding: 40px 24px;
}

.loader-card {
    background: var(--white); border-radius: 16px; box-shadow: var(--shadow);
    padding: 48px 40px; text-align: center; max-width: 380px; width: 100%;
}
.loader-spinner {
    width: 48px; height: 48px; border: 4px solid var(--gray-200);
    border-top-color: var(--orange); border-radius: 50%;
    animation: spin 0.9s linear infinite; margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-title  { font-size: 17px; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.loader-detail { font-size: 13px; color: var(--gray-600); margin-bottom: 16px; }

.loader-bar-track { height: 4px; background: var(--gray-200); border-radius: 2px; overflow: hidden; }
#loader-bar { height: 100%; background: var(--orange); border-radius: 2px; width: 0; transition: width 0.4s ease; }

.error-card {
    background: var(--white); border-radius: 16px; box-shadow: var(--shadow);
    padding: 40px; text-align: center; max-width: 440px; width: 100%;
}
.error-icon { font-size: 42px; margin-bottom: 12px; }
.error-card h3 { font-size: 18px; font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
#error-msg { font-size: 13px; color: var(--gray-600); margin-bottom: 20px; }

/* ── Main app tab navigation ──────────────────────────────────────────────── */
.tab-nav {
    position: sticky; top: var(--header-h); z-index: 90;
    background: var(--white); border-bottom: 1px solid var(--gray-200);
    display: flex; overflow-x: auto; scrollbar-width: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.tab-nav::-webkit-scrollbar { display: none; }

.tab-panel { padding: 24px; max-width: 1280px; margin: 0 auto; }
.tab-panel[hidden] { display: none; }

.tab-header { margin-bottom: 20px; }
.tab-header h2 { font-size: 20px; font-weight: 700; color: var(--navy); }
.tab-header p  { font-size: 13px; color: var(--gray-600); margin-top: 4px; }

/* ── Filter bar ───────────────────────────────────────────────────────────── */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-select {
    padding: 7px 10px; border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 13px; color: var(--gray-800); background: var(--white);
    min-width: 160px; cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(240,90,40,0.1); }
.filter-count { font-size: 12px; color: var(--gray-600); margin-left: auto; }

.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; padding: 12px 0; }
.page-btn {
    padding: 6px 14px; border: 1px solid var(--gray-200); border-radius: 6px;
    background: var(--white); font-size: 13px; color: var(--gray-600); cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.page-btn:hover { background: var(--gray-100); border-color: var(--gray-400); }
.page-info { font-size: 13px; color: var(--gray-600); padding: 0 6px; }

/* ── Concept search ───────────────────────────────────────────────────────── */
.search-box { position: relative; max-width: 600px; margin-bottom: 20px; }
.search-input {
    width: 100%; padding: 12px 16px 12px 42px;
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 15px; color: var(--gray-800); background: var(--white);
    box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus {
    outline: none; border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(240,90,40,0.15), var(--shadow);
}
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }

.popular-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.popular-label { font-size: 12px; font-weight: 600; color: var(--gray-600); text-transform: uppercase; letter-spacing: 0.04em; }
.chip {
    padding: 4px 12px; border: 1px solid var(--gray-200); border-radius: 20px;
    background: var(--white); font-size: 12px; color: var(--gray-800);
    cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { background: var(--orange); border-color: var(--orange); color: var(--white); }

.search-result-card {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 16px; margin-bottom: 10px; cursor: pointer;
    border-left: 3px solid transparent;
    transition: box-shadow 0.15s, transform 0.1s, border-color 0.15s;
}
.search-result-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.12); transform: translateY(-1px); border-left-color: var(--orange); }

.src-header  { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.src-concept { font-size: 15px; font-weight: 700; color: var(--navy); }
.src-cat     { font-size: 12px; color: var(--gray-600); }
.match-badge { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--blue-light); color: var(--blue); }

.src-areas, .src-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.no-results { font-size: 13px; color: var(--gray-600); padding: 16px 0; }

/* ── Chips & area tags ────────────────────────────────────────────────────── */
.area-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    background: var(--blue-light); color: var(--blue); font-size: 12px; font-weight: 500;
}
.area-chip-sm {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 1px 7px; border-radius: 12px;
    background: var(--gray-100); color: var(--gray-600); font-size: 11px;
}
.area-chips-inline { display: inline-flex; gap: 4px; flex-wrap: wrap; align-items: center; }

.tag-chip {
    display: inline-block; padding: 2px 9px; border-radius: 12px;
    font-size: 12px; background: var(--gray-100); color: var(--gray-800); border: 1px solid var(--gray-200);
}
.tag-chip.canonical { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.tag-chip.synonym   { background: #fefce8; color: #92400e;  border-color: #fde68a; }
.tag-chip.more      { background: transparent; color: var(--gray-400); border: none; }

/* ── Confidence badges ────────────────────────────────────────────────────── */
.conf-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.badge-high   { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.badge-medium { background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; }
.badge-low    { background: #fef2f2; color: var(--error);   border: 1px solid #fecaca; }

/* ── Role pills (concept mapping role, not user role) ─────────────────────── */
.role-canonical { font-size: 12px; color: #166534; font-weight: 500; }
.role-synonym   { font-size: 12px; color: #92400e; font-weight: 500; }

/* ── Tree components ──────────────────────────────────────────────────────── */
.tree-cat, .tree-sub, .tree-concept { margin-bottom: 2px; }

.tree-cat > summary,
.tree-sub > summary,
.tree-concept > summary {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; cursor: pointer; border-radius: 8px;
    list-style: none; user-select: none; transition: background 0.12s;
}
.tree-cat     > summary::-webkit-details-marker,
.tree-sub     > summary::-webkit-details-marker,
.tree-concept > summary::-webkit-details-marker { display: none; }

.tree-cat > summary     { background: var(--navy); color: var(--white); font-weight: 600; font-size: 13px; }
.tree-cat > summary:hover { background: var(--blue); }

.tree-sub > summary     { background: var(--blue-light); color: var(--blue); font-weight: 600; font-size: 13px; }
.tree-sub > summary:hover { background: #dde8f6; }

.tree-concept > summary { background: var(--gray-50); color: var(--gray-800); font-size: 13px; border: 1px solid var(--gray-200); }
.tree-concept > summary:hover { background: var(--gray-100); }

.tree-cat-label, .tree-sub-label { flex: 1; }

.tree-badge {
    font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 10px;
    background: rgba(255,255,255,0.2); color: inherit; white-space: nowrap; margin-left: auto;
}
.tree-badge.light { background: rgba(255,255,255,0.25); color: rgba(255,255,255,0.9); }

.tree-indent { padding-left: 20px; padding-top: 4px; padding-bottom: 4px; }

.tree-tag {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 10px; font-size: 12px; border-radius: 6px;
    margin-bottom: 2px; color: var(--gray-700);
}
.tree-tag:hover { background: var(--gray-100); }

/* ── Concept visualizer ───────────────────────────────────────────────────── */
.viz-layout { display: grid; grid-template-columns: 1fr 280px; gap: 20px; align-items: start; }
@media (max-width: 900px) { .viz-layout { grid-template-columns: 1fr; } }

.viz-input-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; }
.viz-input-wrap { position: relative; flex: 1; max-width: 400px; }

.viz-graph-area {
    background: var(--white); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden; min-height: 520px; position: relative;
}
#viz-svg { display: block; width: 100%; }

#viz-suggestions {
    position: absolute; z-index: 50; top: 100%; left: 0; right: 0;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12); margin-top: 2px; overflow: hidden;
}
.ac-item { padding: 9px 14px; font-size: 13px; cursor: pointer; color: var(--gray-800); transition: background 0.1s; }
.ac-item:hover { background: var(--gray-100); }

.viz-info-panel { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; font-size: 13px; }

/* ── Area tab ─────────────────────────────────────────────────────────────── */
.area-button-group { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.area-btn {
    padding: 8px 16px; border: 1px solid var(--gray-200); border-radius: 20px;
    background: var(--white); font-size: 13px; color: var(--gray-800);
    cursor: pointer; transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.area-btn:hover  { background: var(--gray-100); border-color: var(--gray-400); }
.area-btn.active { background: var(--orange); border-color: var(--orange); color: var(--white); }

.area-meta { font-size: 13px; color: var(--gray-700); margin-bottom: 16px; padding: 10px 14px; background: var(--blue-light); border-radius: 8px; }

.view-toggle { display: flex; margin-bottom: 14px; }
.view-toggle button {
    padding: 6px 16px; border: 1px solid var(--gray-200); background: var(--white);
    font-size: 13px; cursor: pointer; color: var(--gray-600);
    transition: background 0.15s, color 0.15s;
}
.view-toggle button:first-child { border-radius: 6px 0 0 6px; border-right: none; }
.view-toggle button:last-child  { border-radius: 0 6px 6px 0; }
.view-toggle button.active { background: var(--orange); border-color: var(--orange); color: var(--white); }

/* ── Category cards ───────────────────────────────────────────────────────── */
.category-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
    margin-bottom: 28px;
}
.cat-card {
    background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px; cursor: pointer; border-top: 4px solid var(--cat-color, var(--orange));
    transition: transform 0.15s, box-shadow 0.15s;
}
.cat-card:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.cat-card.active { outline: 2px solid var(--cat-color, var(--orange)); outline-offset: 2px; }
.cat-card-title  { font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; line-height: 1.3; }
.cat-card-stats  { font-size: 12px; color: var(--gray-600); margin-bottom: 10px; }
.cat-select-btn  { font-size: 12px; padding: 4px 10px; border: 1px solid var(--gray-200); border-radius: 6px; background: var(--white); cursor: pointer; color: var(--gray-700); }
.cat-select-btn:hover { background: var(--gray-100); }

.category-detail { margin-top: 8px; }
.concept-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 5px 0; font-size: 13px; }

/* ── Admin portal — Tab 8 ─────────────────────────────────────────────────── */
.admin-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .admin-columns { grid-template-columns: 1fr; } }

.step-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--orange); margin-bottom: 8px;
}

.admin-panel-box {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); overflow: hidden; min-height: 120px;
}

.manual-add-panel {
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 16px; margin-top: 16px;
}
.manual-add-panel h4 { font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 12px; }
.manual-add-panel .field-group { margin-bottom: 10px; }

.suggestion-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.suggestion-item:last-child { border-bottom: none; }
.sug-main { flex: 1; }
.sug-sub  { font-size: 12px; color: var(--gray-600); }
.btn-add-sug {
    padding: 4px 12px; background: var(--orange); color: var(--white);
    border: none; border-radius: 6px; font-size: 12px; cursor: pointer;
    white-space: nowrap; transition: background 0.15s;
}
.btn-add-sug:hover { background: var(--orange-dark); }

.staged-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--gray-100); font-size: 13px; }
.staged-item > div { flex: 1; }
.staged-item:last-child { border-bottom: none; }
.btn-remove {
    padding: 2px 8px; background: none; border: 1px solid var(--gray-200);
    border-radius: 6px; font-size: 12px; color: var(--gray-600); cursor: pointer;
}
.btn-remove:hover { background: #fef2f2; border-color: #fecaca; color: var(--error); }

.badge-new { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: var(--blue-light); color: var(--blue); font-weight: 600; }
.badge-gap { font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #fef3c7; color: #92400e; font-weight: 600; }

.submit-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-top: 16px; border-top: 1px solid var(--gray-200); margin-top: 16px; }
.submit-row .field-group { flex: 1; min-width: 200px; margin-bottom: 0; }

.btn-secondary {
    padding: 10px 20px; background: var(--white);
    border: 1px solid var(--gray-200); border-radius: var(--radius);
    font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.btn-secondary:hover    { background: var(--gray-100); border-color: var(--gray-400); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }
