/* ══════════════════════════════════════════════
   NELLCA DELIVERY – Förarapp CSS
   ══════════════════════════════════════════════ */

.ndel-driver-app {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 60px;
    font-size: 14px;
}

/* ── Tabbar ── */
.ndel-tabs {
    display: flex;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
    gap: 4px;
}
.ndel-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background .15s, color .15s;
}
.ndel-tab.active {
    background: #111;
    color: #fff;
}
.ndel-tab:not(.active):hover { background: #f0f0f0; color: #333; }

.ndel-badge {
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.ndel-badge--gray { background: #888; }

/* ── Paneler ── */
.ndel-panel { display: none; }
.ndel-panel.active { display: block; }
.ndel-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

/* ── Tom lista ── */
.ndel-empty {
    text-align: center;
    padding: 50px 20px;
    color: #aaa;
}
.ndel-empty .fa { font-size: 36px; margin-bottom: 12px; display: block; }
.ndel-empty p { margin: 0; font-size: 14px; line-height: 1.6; }

/* ── Leveranskort ── */
.ndel-delivery-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 10px;
    transition: box-shadow .15s;
}
.ndel-delivery-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.ndel-dc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.ndel-dc-num { font-weight: 700; font-size: 15px; color: #111; }
.ndel-dc-status {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
}
.ndel-dc-company {
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
    font-size: 14px;
}
.ndel-dc-address {
    color: #555;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-bottom: 6px;
}
.ndel-dc-address .fa { color: #aaa; margin-top: 2px; flex-shrink: 0; }
.ndel-dc-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}
.ndel-dc-meta .fa { color: #ccc; margin-right: 3px; }
.ndel-dc-meta a { color: #888; text-decoration: none; }
.ndel-dc-meta a:hover { color: #111; text-decoration: underline; }
.ndel-dc-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ── Knappar ── */
.ndel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none !important;
    transition: background .15s;
    white-space: nowrap;
}
.ndel-btn--sm { padding: 7px 12px; font-size: 12px; }
.ndel-btn--primary   { background: #111; color: #fff !important; }
.ndel-btn--primary:hover { background: #333; }
.ndel-btn--secondary { background: #f0f0f0; color: #333 !important; border: 1px solid #ddd; }
.ndel-btn--secondary:hover { background: #e4e4e4; }
.ndel-btn--outline   { background: none; color: #555 !important; border: 1px solid #ddd; }
.ndel-btn--outline:hover { background: #f5f5f5; }
.ndel-btn--success   { background: #22c55e; color: #fff !important; }
.ndel-btn--success:hover { background: #16a34a; }
.ndel-btn:disabled   { opacity: .5; cursor: not-allowed; }

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

/* ── Formulärfält ── */
.ndel-field { margin-bottom: 14px; }
.ndel-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 5px;
}
.ndel-field input[type="text"],
.ndel-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #111;
    box-sizing: border-box;
}
.ndel-field input:focus, .ndel-field textarea:focus {
    border-color: #22c55e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(34,197,94,.1);
}

/* ── Signatur canvas ── */
.ndel-sig-wrap {
    position: relative;
    border: 2px dashed #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
    touch-action: none;
}
#ndel-sig-canvas {
    display: block;
    width: 100%;
    height: 160px;
    cursor: crosshair;
    touch-action: none;
}
.ndel-sig-clear {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 11px;
    color: #999;
    cursor: pointer;
    padding: 2px 8px;
    background: #fff;
}

/* ── Rutt-lista ── */
.ndel-route-stop {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}
.ndel-route-stop:last-child { border: none; }
.ndel-route-num {
    width: 28px;
    height: 28px;
    background: #111;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}
.ndel-route-info { flex: 1; }
.ndel-route-name { font-weight: 600; color: #111; font-size: 14px; }
.ndel-route-addr { font-size: 12px; color: #888; margin-top: 2px; }

@media (max-width: 480px) {
    .ndel-delivery-card { padding: 12px; }
    .ndel-modal__box { border-radius: 12px 12px 0 0; }
}
