/* ══════════════════════════════════════════════
   NELLCA DELIVERY – Frontend Översikt CSS
   ══════════════════════════════════════════════ */

.ndel-ov-wrap { max-width: 900px; margin: 0 auto; padding-bottom: 60px; }

/* ── Toolbar ── */
.ndel-ov-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.ndel-ov-title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    color: #111 !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── Statistik ── */
.ndel-ov-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.ndel-ov-stat {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}
.ndel-ov-stat__num   { font-size: 28px; font-weight: 700; color: #111; }
.ndel-ov-stat__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #999; margin-top: 2px; }

/* ── Filter ── */
.ndel-ov-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.ndel-ov-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #111;
    background: #fff;
}
.ndel-ov-clear-filter { font-size: 13px; color: #999; text-decoration: none; }
.ndel-ov-clear-filter:hover { color: #333; }

/* ── Tom lista ── */
.ndel-ov-empty {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
}
.ndel-ov-empty .fa { font-size: 36px; margin-bottom: 12px; display: block; }
.ndel-ov-empty p { margin: 0; font-size: 14px; }

/* ── Rader ── */
.ndel-ov-row {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    transition: box-shadow .15s;
}
.ndel-ov-row:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }
.ndel-ov-row__left { flex: 1; min-width: 0; }
.ndel-ov-row__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}
.ndel-ov-row__title {
    font-weight: 700;
    font-size: 14px;
    color: #111;
}
.ndel-ov-row__cat {
    font-size: 11px;
    color: #888;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 10px;
}
.ndel-ov-status {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}
.ndel-ov-badge-manual {
    font-size: 10px;
    font-weight: 700;
    background: #f3e5f5;
    color: #6a1b9a;
    padding: 2px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ndel-ov-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #888;
}
.ndel-ov-row__meta .fa { color: #ccc; margin-right: 3px; }
.ndel-ov-row__meta a { color: #888; text-decoration: none; }
.ndel-ov-row__meta a:hover { color: #111; text-decoration: underline; }
.ndel-ov-row__notes {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
    font-style: italic;
}
.ndel-ov-row__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
    flex-direction: column;
    align-items: flex-end;
}

/* ── Knappar ── */
.ndel-ov-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: background .15s;
    white-space: nowrap;
}
.ndel-ov-btn--sm { padding: 6px 11px; font-size: 12px; }
.ndel-ov-btn--primary   { background: #111; color: #fff !important; }
.ndel-ov-btn--primary:hover { background: #333; }
.ndel-ov-btn--secondary { background: #f0f0f0; color: #333 !important; border: 1px solid #ddd; }
.ndel-ov-btn--secondary:hover { background: #e4e4e4; }
.ndel-ov-btn--outline   { background: none; color: #555 !important; border: 1px solid #ddd; }
.ndel-ov-btn--outline:hover { background: #f5f5f5; }
.ndel-ov-btn--danger    { background: #ffebee; color: #c62828 !important; border: 1px solid #ef9a9a; }
.ndel-ov-btn--danger:hover { background: #ffcdd2; }

/* ── Modal ── */
.ndel-ov-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ndel-ov-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}
.ndel-ov-modal__box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    display: flex;
    flex-direction: column;
}
.ndel-ov-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.ndel-ov-modal__header h2 { margin: 0; font-size: 17px; font-weight: 700; color: #111; }
.ndel-ov-modal__close { background: none; border: none; font-size: 20px; cursor: pointer; color: #aaa; padding: 0; }
.ndel-ov-modal__close:hover { color: #333; }
.ndel-ov-modal__body { padding: 20px 24px; flex: 1; overflow-y: auto; }
.ndel-ov-modal__footer {
    padding: 14px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ── Formulärfält ── */
.ndel-ov-field { margin-bottom: 14px; }
.ndel-ov-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.ndel-ov-field input[type="text"],
.ndel-ov-field input[type="date"],
.ndel-ov-field select,
.ndel-ov-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #111;
    background: #fff;
    box-sizing: border-box;
}
.ndel-ov-field input:focus,
.ndel-ov-field select:focus,
.ndel-ov-field textarea:focus {
    border-color: #2e7d32;
    outline: none;
    box-shadow: 0 0 0 3px rgba(46,125,50,.1);
}
.ndel-req { color: #c62828; }
.ndel-ov-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Shipday-badge ── */
.ndel-ov-badge-shipday {
    font-size: 10px;
    font-weight: 700;
    background: #e3f2fd;
    color: #0d47a1;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: .04em;
}

/* ── Shipday-modal: sektionstitlar ── */
.ndel-sd-section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin: 18px 0 10px;
    border-top: 1px solid #f0f0f0;
    padding-top: 14px;
}
.ndel-sd-section:first-child { border-top: none; margin-top: 0; padding-top: 0; }

/* ── Shipday-modal: kolli-rader ── */
.ndel-sd-kolli-header,
.ndel-sd-kolli-row {
    display: grid;
    grid-template-columns: 1fr 56px 56px 56px 56px 32px;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
.ndel-sd-kolli-header {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #bbb;
    margin-bottom: 4px;
}
.ndel-sd-kolli-row input {
    padding: 7px 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    color: #111;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.ndel-sd-kolli-row input:focus { border-color: #2e7d32; outline: none; }
.ndel-sd-remove-kolli {
    padding: 5px 7px !important;
    font-size: 11px !important;
    color: #999 !important;
    border-color: #e0e0e0 !important;
}
.ndel-sd-remove-kolli:hover { color: #c62828 !important; border-color: #ef9a9a !important; background: #ffebee !important; }

/* ── Responsiv ── */
@media (max-width: 650px) {
    .ndel-ov-stats { grid-template-columns: repeat(2, 1fr); }
    .ndel-ov-row { flex-direction: column; }
    .ndel-ov-row__actions { flex-direction: row; width: 100%; }
    .ndel-ov-field-row { grid-template-columns: 1fr; }
    .ndel-ov-modal__box { width: 95%; margin: 10px; }
}
