/*
Theme Name: Rufus CRM
Description: CRM intern Rufus Suprastructuri - Dark Theme
Version: 5.0
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --navy: #f0f4f8;
    --navy-light: #ffffff;
    --navy-lighter: #e8eef5;
    --orange: #E8651A;
    --orange-light: #d4580f;
    --orange-glow: rgba(232,101,26,0.1);
    --white: #1a2744;
    --text: #2d3748;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --border-light: #cbd5e1;
    --card-bg: #ffffff;
    --card-hover: #f8fafc;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #f0f4f8;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
}

/* ── LOGIN ─────────────────────────────────────────── */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f4f8;
}
.login-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow), 0 0 60px rgba(232,101,26,0.05);
}
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo img { height: 48px; filter: brightness(1.1); }
.login-logo h1 { font-size: 22px; font-weight: 700; color: #1a2744; margin-top: 12px; letter-spacing: -0.5px; }
.login-logo p { font-size: 13px; color: #64748b; margin-top: 4px; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: 11px; font-weight: 600; color: #374151; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.8px; }
.form-group input {
    width: 100%; padding: 11px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    color: #1a2744; font-size: 14px; font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
}
.form-group input:focus { outline: none; border-color: var(--orange); background: #fff7f0; }
.form-group input::placeholder { color: #94a3b8; }
.btn {
    width: 100%; padding: 12px;
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: white; border: none; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
    transition: opacity 0.2s, transform 0.1s;
    box-shadow: 0 4px 15px rgba(232,101,26,0.3);
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.login-error {
    background: rgba(239,68,68,0.1); color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.2);
    border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 1rem;
}

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

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
    width: 210px;
    background: #0f1f3d;
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0;
    z-index: 10;
}
.sidebar-logo {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo img { height: 38px; filter: brightness(1.1); }
.sidebar-logo span { display: block; font-size: 11px; color: rgba(255,255,255,0.5); margin-top: 6px; letter-spacing: 0.5px; }
.sidebar-section { padding: 1rem 0.75rem 0.5rem; }
.sidebar-section-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; padding: 0 0.5rem; margin-bottom: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; margin: 2px 0;
    color: rgba(255,255,255,0.6); text-decoration: none; font-size: 13px; font-weight: 500;
    border-radius: var(--radius); transition: all 0.2s;
    cursor: pointer; border: none; background: none; width: 100%; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #ffffff; }
.nav-item.active {
    background: rgba(232,101,26,0.15);
    color: #ff7a2e;
    border: 1px solid rgba(232,101,26,0.25);
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.sidebar-user strong { display: block; font-size: 13px; font-weight: 600; color: #ffffff; }
.sidebar-user span { font-size: 11px; color: rgba(255,255,255,0.5); }
.logout-btn {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
    color: rgba(255,255,255,0.5); font-size: 12px; text-decoration: none;
    padding: 7px 10px; border-radius: var(--radius); transition: all 0.2s;
}
.logout-btn:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ── MAIN ─────────────────────────────────────────── */
.main-content { margin-left: 210px; flex: 1; padding: 2rem; }

/* ── TOPBAR ─────────────────────────────────────────── */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.75rem; }
.topbar h1 { font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -0.5px; }
.topbar-actions { display: flex; gap: 8px; }

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--orange), var(--orange-light));
    color: white; border: none; border-radius: var(--radius);
    padding: 9px 18px; font-size: 13px; font-weight: 600; cursor: pointer;
    display: inline-flex; align-items: center; gap: 7px; font-family: inherit;
    box-shadow: 0 4px 12px rgba(232,101,26,0.25); transition: all 0.2s;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(232,101,26,0.35); }
.btn-secondary {
    background: #f8fafc; color: #374151;
    border: 1px solid #e2e8f0; border-radius: var(--radius);
    padding: 8px 14px; font-size: 13px; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px; transition: all 0.2s;
}
.btn-secondary:hover { background: #f1f5f9; color: #1a2744; }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-danger {
    background: rgba(239,68,68,0.1); color: #fca5a5;
    border: 1px solid rgba(239,68,68,0.2); border-radius: var(--radius);
    padding: 5px 11px; font-size: 12px; cursor: pointer; font-family: inherit; transition: all 0.2s;
}
.btn-danger:hover { background: rgba(239,68,68,0.2); color: #f87171; }

/* ── BUTON STATUS ─────────────────────────────────── */
.btn-status {
    background: rgba(232,101,26,0.08); color: #e8651a;
    border: 1.5px solid rgba(232,101,26,0.4); border-radius: var(--radius);
    padding: 5px 11px; font-size: 12px; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 5px;
    font-weight: 600; transition: all 0.2s; white-space: nowrap;
}
.btn-status:hover { background: rgba(232,101,26,0.18); border-color: #e8651a; color: #c45510; }

/* ── STATS ─────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 1.75rem; }
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.25rem;
    position: relative; overflow: hidden;
    transition: border-color 0.2s;
}
.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
}
.stat-card.orange::before { background: linear-gradient(90deg, var(--orange), var(--orange-light)); }
.stat-card.red::before { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card:hover { border-color: var(--border-light); }
.stat-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--white); letter-spacing: -1px; }
.stat-card.orange .stat-value { color: var(--orange-light); }
.stat-card.red .stat-value { color: #f87171; }
.stat-sub-red { display: flex; align-items: center; gap: 4px; font-size: 11px; color: #fca5a5; margin-top: 4px; }

/* ── FILTERS ─────────────────────────────────────────── */
.filters-bar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    background: #ffffff; border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg); padding: 12px 14px; margin-bottom: 1.5rem;
}
.search-input, .filter-select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius); padding: 8px 12px;
    color: #2d3748; font-size: 13px; font-family: inherit;
    transition: border-color 0.2s;
}
.search-input { min-width: 180px; }
.search-input:focus, .filter-select:focus { outline: none; border-color: var(--orange); }
.search-input::placeholder { color: #94a3b8; }
.filter-select option { background: #ffffff; color: #2d3748; }

/* ── MONTHS ─────────────────────────────────────────── */
.month-section { margin-bottom: 1.5rem; }
.month-header {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 4px; cursor: pointer; user-select: none;
}
.month-chevron { color: var(--text-muted); transition: transform 0.2s; }
.month-section.open .month-chevron { transform: rotate(180deg); }
.month-title { font-size: 15px; font-weight: 600; color: var(--white); }
.month-total {
    margin-left: auto;
    font-size: 13px; font-weight: 700; color: #1a2744;
    background: #f0f4f8; border: 1px solid #e2e8f0;
    border-radius: 8px; padding: 2px 10px;
}
.month-badge {
    background: #f1f5f9; color: #64748b;
    font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
    border: 1px solid #e2e8f0;
}
.month-body { display: none; }
.month-section.open .month-body { display: block; }

/* ── TABLE ─────────────────────────────────────────── */
.table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.crm-table { width: 100%; border-collapse: collapse; }
.crm-table th {
    background: #f8fafc;
    padding: 10px 14px; text-align: left;
    font-size: 10px; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
}
.crm-table td {
    padding: 13px 14px; border-bottom: 1px solid var(--border);
    font-size: 13px; color: var(--text); vertical-align: middle;
}
.crm-table tr:last-child td { border-bottom: none; }
.crm-table tr:hover td { background: #f8fafc; }
.crm-table td strong { color: #1a2744; font-weight: 600; }
.no-orders { text-align: center; padding: 3rem; color: var(--text-muted); font-size: 13px; }

/* ── BADGES ─────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 99px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}

/* ── AUDIT ROW ─────────────────────────────────────────── */
.audit-row td { padding: 4px 14px 8px; border-bottom: 1px solid var(--border); }
.audit-info { font-size: 11px; color: #94a3b8; display: flex; align-items: center; gap: 4px; }

/* ── ALERTS ─────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; font-size: 13px; }
.alert-error { background: rgba(239,68,68,0.1); color: #fca5a5; border: 1px solid rgba(239,68,68,0.2); }

/* ── PDF LINK ─────────────────────────────────────────── */
.pdf-link { color: var(--orange-light); text-decoration: none; font-size: 12px; display: inline-flex; align-items: center; gap: 4px; font-weight: 500; }
.pdf-link:hover { text-decoration: underline; }

/* ── MODAL ─────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); z-index: 1002; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-xl);
    padding: 1.75rem; width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-title { font-size: 17px; font-weight: 700; color: #1a2744; margin-bottom: 1.5rem; letter-spacing: -0.3px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-group { margin-bottom: 14px; }
.modal-group label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 6px; }
.modal-group input, .modal-group select, .modal-group textarea {
    width: 100%; padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: var(--radius);
    color: #2d3748; font-size: 13px; font-family: inherit;
    transition: border-color 0.2s;
}
.modal-group input:focus, .modal-group select:focus, .modal-group textarea:focus { outline: none; border-color: var(--orange); }
.modal-group input::placeholder, .modal-group textarea::placeholder { color: #94a3b8; }
.modal-group select option { background: #ffffff; color: #2d3748; }
.modal-group textarea { height: 80px; resize: vertical; }
.file-upload-label {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border: 1px dashed var(--border-light);
    border-radius: var(--radius); cursor: pointer; color: var(--text-muted);
    font-size: 13px; transition: all 0.2s;
}
.file-upload-label:hover { border-color: var(--orange); color: var(--orange-light); }
.file-upload-label input { display: none; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1.25rem; border-top: 1px solid #e2e8f0; padding-top: 1.25rem; }

/* ── MOBILE CARDS ─────────────────────────────────────────── */
.mobile-cards { display: none; }


/* ── STICKY BAR ───────────────────────────────────── */
#sticky-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 210px;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    z-index: 90;
    padding: 10px 2rem;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
#sticky-bar.visible { display: flex; }
.sticky-stats { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sticky-stat { display: flex; align-items: center; gap: 6px; }
.sticky-stat-label { font-size: 11px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: 0.6px; }
.sticky-stat-value { font-size: 15px; font-weight: 700; color: #1a2744; }
.sticky-stat-value.orange { color: #E8651A; }
.sticky-stat-value.red { color: #f87171; }
.sticky-divider { width: 1px; height: 20px; background: #e2e8f0; }
.sticky-title { font-size: 13px; font-weight: 700; color: #1a2744; white-space: nowrap; margin-right: 4px; }

@media (max-width: 768px) {
    .crm-table { display: none; }
    .table-card { overflow: visible; background: transparent; border: none; box-shadow: none; }
    .mobile-cards { display: flex; flex-direction: column; gap: 12px; }
    .mobile-card {
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-radius: var(--radius-lg);
        padding: 16px;
        box-shadow: var(--shadow-sm);
    }
    .mobile-card-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
    .mobile-card-client { font-size: 15px; font-weight: 700; color: var(--white); }
    .mobile-card-obs { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
    .mobile-card-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
    .mobile-card-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); font-weight: 600; margin-bottom: 3px; }
    .mobile-card-value { font-size: 13px; color: #2d3748; font-weight: 500; }
    .mobile-card-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 12px; gap: 8px; flex-wrap: wrap; }
    .mobile-card-audit { font-size: 11px; color: var(--text-muted); }
    .mobile-card-actions { display: flex; gap: 6px; }

    /* Layout */
    .crm-layout { flex-direction: column; }
    .sidebar { display: none; }
    .main-content { margin-left: 0; margin-top: 60px; padding: 1rem; }

    /* Stats */
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 1.25rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 24px; }

    /* Topbar */
    .topbar { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 1.25rem; }
    .topbar h1 { font-size: 18px; }
    #sticky-bar {
        left: 0;
        top: 60px;
        padding: 6px 12px;
        gap: 6px;
        z-index: 999;
        flex-wrap: nowrap;
        align-items: center;
    }
    .sticky-stats {
        flex: 1;
        gap: 0;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        overflow: hidden;
    }
    .sticky-stat {
        flex-direction: column;
        align-items: center;
        gap: 0;
        padding: 0 6px;
        flex: 1;
        min-width: 0;
    }
    .sticky-stat-label {
        font-size: 8px;
        letter-spacing: 0.3px;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        text-align: center;
    }
    .sticky-stat-value {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        text-align: center;
    }
    .sticky-divider { display: none; }
    .sticky-title { display: none; }
    #sticky-bar .btn-primary {
        flex-shrink: 0;
        width: 36px; height: 36px;
        padding: 0;
        border-radius: 50%;
        font-size: 0;
        gap: 0;
        justify-content: center;
        align-items: center;
        display: flex;
        background: #22c55e;
        box-shadow: 0 2px 10px rgba(34,197,94,0.45);
        border: none;
    }
    #sticky-bar .btn-primary:hover { background: #16a34a; opacity: 1; transform: none; }
    #sticky-bar .sticky-btn-text { display: none; }
    #sticky-bar .btn-primary svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 3; }
    #sticky-bar .sticky-stats::-webkit-scrollbar { display: none; }
    .month-total { font-size: 12px; padding: 2px 7px; }

    /* Filters */
    .filters-bar { flex-direction: column; gap: 8px; padding: 10px; }
    .filters-bar input, .filters-bar select, .filters-bar button, .filters-bar a { width: 100%; }
    .search-input { min-width: unset; }

    /* Buttons */
    .btn-primary, .btn-secondary { padding: 11px 16px; font-size: 14px; }
    .btn-sm { padding: 7px 12px; font-size: 13px; }
    .btn-danger { padding: 7px 12px; font-size: 13px; }
    .btn-status { padding: 7px 12px; font-size: 13px; }

    /* Modal */
    .modal-overlay { align-items: flex-end; padding: 0 0 12vh 0; }
    .modal-box { max-width: 100%; border-radius: 20px 20px 0 0; max-height: 80vh; padding: 1.5rem; }
    .modal-grid { grid-template-columns: 1fr; }
}

/* Pret vizibil */
.crm-table td.pret-cell { font-weight: 700; color: #1a2744; font-size: 14px; white-space: nowrap; }

@media (max-width: 768px) {
    .mobile-card-value.pret { font-size: 15px; font-weight: 700; color: #1a2744; }
}

/* ── QC DOTS ─────────────────────────────────────────── */
.qc-dots { display: flex; gap: 3px; align-items: center; }
.qc-dot {
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 9px; font-weight: 800; display: flex;
    align-items: center; justify-content: center;
    cursor: default; transition: transform 0.15s;
}
.qc-dot:hover { transform: scale(1.15); }
.qc-dot.green { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.qc-dot.red   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* ── QC MODAL ────────────────────────────────────────── */
.qc-header { margin-bottom: 14px; }
.qc-comanda-info { font-size: 12px; color: #64748b; margin-top: 4px; }
.qc-section { border: 1px solid #e2e8f0; border-radius: 10px; padding: 14px; margin-bottom: 12px; }
.qc-section-title { font-size: 12px; font-weight: 700; color: #1a2744; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.qc-required-badge { font-size: 10px; font-weight: 600; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; border-radius: 6px; padding: 1px 6px; margin-left: 6px; text-transform: none; letter-spacing: 0; }

.qc-checklist { display: flex; flex-direction: column; gap: 6px; }
.qc-check-item { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; padding: 6px 8px; border-radius: 7px; border: 1px solid transparent; transition: all 0.15s; font-size: 13px; }
.qc-check-item:hover { background: #f8fafc; border-color: #e2e8f0; }
.qc-check-item input[type=checkbox] { margin-top: 2px; flex-shrink: 0; width: 15px; height: 15px; accent-color: #22c55e; cursor: pointer; }
.qc-check-item.qc-required { font-weight: 600; }
.qc-check-item input:checked + span { color: #166534; }

.qc-decizie-grid { display: flex; gap: 8px; }
.qc-decizie-opt { flex: 1; cursor: pointer; }
.qc-decizie-opt input { display: none; }
.qc-decizie-btn { display: flex; align-items: center; justify-content: center; padding: 8px 4px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 2px solid #e2e8f0; transition: all 0.2s; text-align: center; }
.qc-decizie-opt input:checked + .qc-decizie-btn.green  { background: #dcfce7; border-color: #22c55e; color: #166534; }
.qc-decizie-opt input:checked + .qc-decizie-btn.orange { background: #fff7ed; border-color: #f97316; color: #9a3412; }
.qc-decizie-opt input:checked + .qc-decizie-btn.red    { background: #fef2f2; border-color: #ef4444; color: #991b1b; }
.qc-decizie-btn:hover { background: #f8fafc; }

/* Poze upload */
.qc-photos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.qc-photo-label { cursor: pointer; }
.qc-photo-inner {
    border: 2px dashed #cbd5e1; border-radius: 10px;
    height: 90px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 4px;
    color: #94a3b8; font-size: 11px; transition: all 0.2s;
    overflow: hidden;
}
.qc-photo-label:hover .qc-photo-inner { border-color: #E8651A; color: #E8651A; }
.qc-photo-label.has-photo .qc-photo-inner { border-style: solid; border-color: #22c55e; }
.qc-photo-label input[type=file] { display: none; }

/* Semnătură canvas */
.signature-canvas {
    width: 100%; height: 80px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    cursor: crosshair; background: #f8fafc; touch-action: none;
}

/* File upload spec tehnica */
.file-upload-label.has-file { border-color: #22c55e; color: #166534; background: #f0fdf4; }

/* Modal scroll pe mobile pt QC */
@media (max-width: 768px) {
    .qc-decizie-grid { flex-direction: column; }
    .qc-photos-grid { grid-template-columns: repeat(3,1fr); gap: 6px; }
    .qc-photo-inner { height: 75px; }
    .signature-canvas { height: 70px; }
}

/* ── QC VIEW MODAL ───────────────────────────────────── */
.qc-view-section { border:1px solid #e2e8f0; border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.qc-view-title { font-size:11px; font-weight:700; color:#64748b; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:8px; }
.qc-view-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px solid #f1f5f9; font-size:13px; color:#374151; gap:8px; }
.qc-view-row:last-child { border-bottom:none; }
.qc-view-row span:first-child { color:#64748b; flex:1; }

/* ── QC VEHICLE GRID ─────────────────────────────────── */
.qc-vehicle-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px 12px; }
.qc-veh-item { display:flex; flex-direction:column; gap:2px; }
.qc-veh-label { font-size:9px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:0.4px; }
.qc-veh-val { font-size:13px; color:#1a2744; font-weight:500; }

/* ── BTN QC VIEW ─────────────────────────────────────── */
.btn-qc-view {
    background: rgba(59,130,246,0.08); color:#1d4ed8;
    border:1.5px solid rgba(59,130,246,0.3); border-radius:var(--radius);
    padding:5px 10px; font-size:11px; cursor:pointer; font-family:inherit;
    font-weight:600; transition:all 0.2s; white-space:nowrap;
}
.btn-qc-view:hover { background:rgba(59,130,246,0.15); border-color:#1d4ed8; }
@media (max-width:768px) {
    .qc-vehicle-grid { grid-template-columns:1fr 1fr; }
    .btn-qc-view { padding:7px 12px; font-size:12px; width:100%; margin-top:4px; }
}

/* ── QC LIST PAGE ────────────────────────────────────── */
.qc-list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.qc-list-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: box-shadow 0.2s; }
.qc-list-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
.qc-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.qc-card-client { font-size: 15px; font-weight: 700; color: #1a2744; }
.qc-card-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.qc-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.qc-meta-item { display: flex; flex-direction: column; gap: 1px; }
.qc-meta-label { font-size: 9px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.4px; }
.qc-meta-item span:last-child { font-size: 12px; color: #1a2744; font-weight: 500; }
.qc-card-bar { display: flex; align-items: center; gap: 8px; }
.qc-bar-track { flex: 1; height: 6px; background: #e2e8f0; border-radius: 10px; overflow: hidden; }
.qc-bar-fill { height: 100%; background: #22c55e; border-radius: 10px; transition: width 0.5s ease; }
.qc-bar-label { font-size: 11px; color: #64748b; white-space: nowrap; }
.qc-card-bottom { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qc-decizie-chip { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.qc-card-thumbs { display: flex; gap: 4px; }
.qc-card-thumbs a img { width: 36px; height: 28px; object-fit: cover; border-radius: 4px; border: 1px solid #e2e8f0; }
.qc-card-date { font-size: 10px; color: #94a3b8; border-top: 1px solid #f1f5f9; padding-top: 6px; }

@media (max-width: 768px) {
    .qc-list-grid { grid-template-columns: 1fr; }
}
