:root {
    --bg: #020617;
    --bg2: #0b0d10;
    --bg3: #11161c;
    --border: #1f2933;
    --accent: #2563eb;
    --accent-soft: #1d4ed8;
    --danger: #b91c1c;
    --text: #e5e7eb;
    --muted: #9ca3af;
}

/* Reset & body */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* Top bar (folosit și la index și la admin) */
.topbar {
    background: var(--bg3);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
}

.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.topbar h1 {
    margin: 0;
    font-size: 18px;
}

.topbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Layout general */
.page {
    max-width: 1100px;
    margin: 16px auto 32px;
    padding: 0 16px;
}

.card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.card h2 {
    margin: 0 0 8px;
    font-size: 15px;
}

/* Grid helpers */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 8px;
}

/* Form elements */
label {
    font-size: 12px;
    color: var(--muted);
    display: block;
    margin-bottom: 3px;
}

input,
select,
textarea {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #020617;
    color: var(--text);
    font-size: 13px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-soft);
}

/* Butoane */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

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

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

.btn-secondary {
    background: #020617;
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent-soft);
    color: #fff;
}

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

.btn-danger:hover {
    background: #991b1b;
}

.btn-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #020617;
    color: var(--text);
    font-size: 12px;
    text-decoration: none;
}

.btn-link:hover {
    border-color: var(--accent-soft);
    color: #fff;
}

/* Preset bar (folosit în index la calculator) */
.preset-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.preset-btn {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #020617;
    color: #e5e7eb;
    font-size: 11px;
    cursor: pointer;
}

.preset-btn:hover {
    border-color: var(--accent-soft);
}

/* Diverse utile pentru calculator */
.error {
    background: #7f1d1d;
    color: #fecaca;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
    margin-bottom: 10px;
}

.result {
    font-size: 14px;
}

.result strong {
    font-size: 16px;
}

.result-list {
    list-style: none;
    padding-left: 0;
    font-size: 13px;
    line-height: 1.5;
}

.help {
    cursor: help;
    color: #9ca3af;
    margin-left: 4px;
    font-size: 11px;
}

/* Tabele admin */
.table-wrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 900px;
}

th,
td {
    border: 1px solid #111827;
    padding: 6px 8px;
    font-size: 12px;
}

th {
    background: #020617;
    color: #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Badge-uri */
.badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    background: #1f2937;
    color: #e5e7eb;
}

.badge-on {
    background: #16a34a;
}

.badge-off {
    background: #6b7280;
}

.badge-offer {
    background: #1d4ed8;
}

.badge-accepted {
    background: #16a34a;
    color: #022c22;
}

.badge-printed {
    background: #22c55e;
    color: #052e16;
}

.badge-delivered {
    background: #0f766e;
    color: #e0f2fe;
}

.badge-cancelled {
    background: #991b1b;
    color: #fee2e2;
}

/* Form status inline (la admin_jobs) */
.status-form {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-form select {
    width: auto;
    min-width: 90px;
    padding: 3px 6px;
    font-size: 11px;
}

.status-form .btn {
    padding: 3px 8px;
    font-size: 11px;
}

.actions-row .btn {
  padding: 4px 8px;
}

.actions-row .btn i {
  font-size: 14px;
}

/* Diverse */
.meta {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.small {
    font-size: 11px;
    color: var(--muted);
}

/* Layout detalii job (dl/dt/dd) */
dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 4px 10px;
    font-size: 13px;
}

dt {
    color: var(--muted);
    text-align: right;
}

dd {
    margin: 0;
}

.row-highlight {
    background: rgba(56,189,248,0.16);
}

.row-highlight td {
    border-top: 2px solid rgba(56,189,248,0.85);
    border-bottom: 2px solid rgba(56,189,248,0.85);
}

/* Responsive */
@media (max-width:720px) {

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        min-width: 700px;
    }
}

/* Icoane în topbar */
.topbar-nav .btn-link i {
    margin-right: 4px;
}
