/* ═══════════════════════════════════════════════
   DeliveryOS — Delivery Theme CSS
   Netmark Systems and Technologies
═══════════════════════════════════════════════ */

:root {
    --navy:    #0F1B2D;
    --navy-2:  #1A2B42;
    --white:   #FFFFFF;
    --off:     #F0F2F5;
    --amber:   #F5A623;
    --amber-l: #FEF3DC;
    --blue:    #2563EB;
    --blue-l:  #DBEAFE;
    --green:   #16A34A;
    --green-l: #DCFCE7;
    --purple:  #7C3AED;
    --purple-l:#EDE9FE;
    --danger:  #DC2626;
    --danger-l:#FEE2E2;
    --slate:   #6B7A8D;
    --border:  #E2E6EA;
    --radius:  10px;
    --shadow:  0 2px 8px rgba(0,0,0,.08);
    /* Role accents */
    --admin-accent:  #F5A623;
    --vendor-accent: #2563EB;
    --agent-accent:  #16A34A;
}

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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--off); color: var(--navy); }

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

.dt-main {
    flex: 1;
    padding: 0 0 40px 0;
    overflow-y: auto;
    max-width: 100%;
}

/* ── SIDEBAR ── */
.dt-sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.dt-sidebar-admin  { border-top: 4px solid var(--admin-accent); }
.dt-sidebar-vendor { border-top: 4px solid var(--vendor-accent); }
.dt-sidebar-agent  { border-top: 4px solid var(--agent-accent); }

.dt-sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 20px 12px;
}
.dt-logo-icon { font-size: 24px; }
.dt-logo-text { color: var(--white); font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }

.dt-sidebar-role {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--slate);
    padding: 0 20px 16px;
}
.dt-sidebar-admin  .dt-sidebar-role { color: var(--amber); }
.dt-sidebar-vendor .dt-sidebar-role { color: #60A5FA; }
.dt-sidebar-agent  .dt-sidebar-role { color: #4ADE80; }

.dt-sidebar-nav { flex: 1; padding: 8px 12px; }

.dt-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #94A3B8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
    margin-bottom: 2px;
}
.dt-nav-link:hover {
    background: rgba(255,255,255,.07);
    color: var(--white);
    text-decoration: none;
}

.dt-sidebar-footer { padding: 16px 12px 20px; border-top: 1px solid rgba(255,255,255,.08); }
.dt-sidebar-user { color: var(--white); font-size: 13px; font-weight: 500; padding: 0 12px 8px; }
.dt-logout { color: #64748B !important; }

/* ── TOPBAR ── */
.dt-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--white);
    margin-bottom: 28px;
}
.dt-topbar h2 { font-size: 20px; font-weight: 700; color: var(--navy); }

.dt-user-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.dt-user-badge.admin  { background: var(--amber-l); color: #92400E; }
.dt-user-badge.vendor { background: var(--blue-l);  color: #1E40AF; }
.dt-user-badge.agent  { background: var(--green-l); color: #14532D; }

/* ── STATS ── */
.dt-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    padding: 0 32px;
    margin-bottom: 32px;
}
.dt-stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--border);
}
.dt-stat-amber  { border-color: var(--amber); }
.dt-stat-blue   { border-color: var(--blue);  }
.dt-stat-green  { border-color: var(--green); }
.dt-stat-icon   { font-size: 22px; margin-bottom: 8px; }
.dt-stat-value  { font-size: 28px; font-weight: 800; color: var(--navy); line-height: 1; }
.dt-stat-label  { font-size: 12px; color: var(--slate); margin-top: 4px; text-transform: uppercase; letter-spacing: .5px; }

/* ── SECTIONS ── */
.dt-section { padding: 0 32px; margin-bottom: 32px; }
.dt-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.dt-section-header h3 { font-size: 16px; font-weight: 700; }

/* ── CARDS ── */
.dt-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 16px;
}

.dt-delivery-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.dt-delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}
.dt-delivery-address { font-size: 13px; color: var(--slate); margin-bottom: 4px; }
.dt-delivery-desc    { font-size: 13px; color: var(--slate); font-style: italic; margin-bottom: 8px; }
.dt-delivery-footer  {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 8px;
}
.dt-delivery-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── TABLE ── */
.dt-table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
.dt-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 14px;
}
.dt-table thead tr { background: var(--navy); }
.dt-table thead th { padding: 12px 16px; text-align: left; color: var(--white); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.dt-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dt-table tbody tr:last-child td { border-bottom: none; }
.dt-table tbody tr:hover { background: var(--off); }
.dt-empty { text-align: center; color: var(--slate); padding: 24px !important; }

/* ── FORMS ── */
.dt-form { display: flex; flex-direction: column; gap: 14px; }
.dt-form-inline { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.dt-field { display: flex; flex-direction: column; gap: 5px; }
.dt-field-full { grid-column: 1 / -1; }
.dt-field label { font-size: 12px; font-weight: 600; color: var(--slate); text-transform: uppercase; letter-spacing: .4px; }
.dt-field input,
.dt-field textarea,
.dt-field select { padding: 9px 12px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 14px; outline: none; transition: border .15s; background: var(--white); }
.dt-field input:focus,
.dt-field textarea:focus,
.dt-field select:focus { border-color: var(--blue); }
.dt-select { padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 7px; font-size: 13px; background: var(--white); }

/* ── BUTTONS ── */
.dt-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .15s, transform .1s;
    white-space: nowrap;
}
.dt-btn:hover { opacity: .88; transform: translateY(-1px); text-decoration: none; }
.dt-btn:active { transform: translateY(0); }
.dt-btn-sm { padding: 6px 12px; font-size: 12px; }
.dt-btn-full { width: 100%; justify-content: center; }

.dt-btn-primary { background: var(--navy);   color: var(--white); }
.dt-btn-vendor  { background: var(--blue);   color: var(--white); }
.dt-btn-agent   { background: var(--green);  color: var(--white); }
.dt-btn-success { background: var(--green);  color: var(--white); }
.dt-btn-danger  { background: var(--danger); color: var(--white); }

/* ── BADGES ── */
.dt-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.dt-badge-amber  { background: var(--amber-l);  color: #92400E; }
.dt-badge-blue   { background: var(--blue-l);   color: #1E40AF; }
.dt-badge-green  { background: var(--green-l);  color: #14532D; }
.dt-badge-purple { background: var(--purple-l); color: #5B21B6; }

/* ── ALERTS ── */
.dt-alert { padding: 12px 20px; border-radius: 8px; font-size: 14px; margin: 0 32px 20px; }
.dt-alert-success { background: var(--green-l); color: #14532D; border-left: 4px solid var(--green); }
.dt-alert-error   { background: var(--danger-l); color: #7F1D1D; border-left: 4px solid var(--danger); }

/* ── MISC ── */
.dt-muted       { color: var(--slate); font-size: 13px; }
.dt-empty-state { text-align: center; color: var(--slate); padding: 40px 20px; background: var(--white); border-radius: var(--radius); }
.dt-inline-form { display: inline-flex; align-items: center; gap: 6px; }

/* ── LOGIN ── */
.dt-login-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--navy);
}
.dt-login-card {
    background: var(--white);
    border-radius: 14px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.dt-login-logo { text-align: center; margin-bottom: 28px; }
.dt-login-logo .dt-logo-icon { font-size: 40px; display: block; margin-bottom: 8px; }
.dt-login-logo h1 { font-size: 24px; font-weight: 800; color: var(--navy); }
.dt-login-logo p  { color: var(--slate); font-size: 14px; margin-top: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .dt-wrap { flex-direction: column; }
    .dt-sidebar { width: 100%; min-height: auto; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px; }
    .dt-sidebar-logo { padding: 0 12px; }
    .dt-sidebar-nav { display: flex; flex-direction: row; flex-wrap: wrap; padding: 0; }
    .dt-sidebar-footer { padding: 0 12px; display: flex; align-items: center; gap: 12px; margin-left: auto; }
    .dt-sidebar-role { display: none; }
    .dt-topbar { padding: 16px 20px; }
    .dt-stats { padding: 0 20px; }
    .dt-section { padding: 0 20px; }
    .dt-alert  { margin: 0 20px 16px; }
    .dt-form-inline { grid-template-columns: 1fr; }
}
