/* Smart Courier Manager — Driver Portal Styles */

.scm-portal-wrap {
    max-width: 860px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Card shell */
.scm-portal-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
    margin-bottom: 20px;
}
.scm-portal-card-header {
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    color: #fff;
    padding: 28px 32px 24px;
    text-align: center;
}
.scm-portal-card-icon { font-size: 44px; display: block; margin-bottom: 10px; }
.scm-portal-card-header h2 { margin: 0 0 8px; font-size: 22px; color: #fff; }
.scm-portal-card-header p { margin: 0; font-size: 14px; color: rgba(255,255,255,.7); }

/* Forms inside card */
.scm-portal-form { padding: 28px 32px; }
.scm-portal-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 600px) { .scm-portal-row { grid-template-columns: 1fr; } }
.scm-portal-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 16px; }
.scm-portal-field label { font-size: 13px; font-weight: 600; color: #374151; }
.scm-portal-field--checkbox { flex-direction: row; align-items: center; gap: 8px; }
.scm-portal-field--checkbox label { font-weight: 400; cursor: pointer; }

.scm-portal-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1f2937;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    width: 100%;
    box-sizing: border-box;
}
.scm-portal-input:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* Buttons */
.scm-portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: #2563eb;
    color: #fff !important;
    border: 2px solid #2563eb;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .15s, border-color .15s;
    width: 100%;
}
.scm-portal-btn:hover { background: #1d4ed8; border-color: #1d4ed8; }
.scm-portal-btn--outline { background: transparent; color: #2563eb !important; width: auto; }
.scm-portal-btn--outline:hover { background: #eff6ff; }
.scm-portal-btn--sm { width: auto; padding: 9px 20px; font-size: 14px; }

/* Messages */
.scm-portal-error { background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626; padding: 12px 16px; border-radius: 6px; font-size: 14px; margin: 0 32px 16px; }
.scm-portal-flash { background: #f0fdf4; border: 1px solid #86efac; color: #166534; padding: 12px 16px; border-radius: 6px; font-size: 14px; margin-bottom: 16px; }
.scm-portal-success-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 48px 32px; text-align: center; }
.scm-portal-success-icon { font-size: 52px; margin-bottom: 12px; }
.scm-portal-success-box h3 { margin: 0 0 8px; font-size: 22px; color: #1a202c; }
.scm-portal-success-box p { color: #6b7280; font-size: 15px; }
.scm-portal-alt-link { text-align: center; padding: 0 32px 24px; font-size: 13px; color: #6b7280; }
.scm-portal-alt-link a { color: #2563eb; font-weight: 600; }
.scm-portal-pending { padding: 48px 32px; text-align: center; }

/* ── Dashboard ──────────────────────────────────────────────────────── */
.scm-driver-dashboard { padding: 0; }

/* Header bar */
.scm-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1d2327 0%, #2c3338 100%);
    color: #fff;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.scm-dash-welcome { display: flex; align-items: center; gap: 14px; }
.scm-dash-avatar { width: 48px; height: 48px; border-radius: 50%; background: #2563eb; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.scm-dash-name { font-size: 18px; font-weight: 700; color: #fff; }
.scm-dash-meta { font-size: 13px; color: rgba(255,255,255,.7); margin-top: 2px; }

/* Stats row */
.scm-dash-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.scm-dash-stat { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; padding: 18px; text-align: center; }
.scm-dash-stat-val { display: block; font-size: 32px; font-weight: 800; color: #1f2937; line-height: 1; margin-bottom: 6px; }
.scm-dash-stat-val--blue  { color: #2563eb; }
.scm-dash-stat-val--green { color: #059669; }
.scm-dash-stat-lbl { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; }

/* Tabs */
.scm-dash-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.scm-dash-tab {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-decoration: none;
    transition: all .15s;
}
.scm-dash-tab:hover { border-color: #2563eb; color: #2563eb; }
.scm-dash-tab.active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* Shipment cards grid */
.scm-dash-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .scm-dash-cards { grid-template-columns: 1fr 1fr; } }

.scm-dash-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.scm-dash-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.scm-dash-tid { font-size: 13px; font-weight: 800; color: #1f2937; flex: 1; }
.scm-dash-date { font-size: 11px; color: #9ca3af; margin-left: auto; }
.scm-dash-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }

.scm-dash-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f1;
}
.scm-dash-addr { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.scm-dash-addr:first-child { border-right: 1px solid #f0f0f1; padding-right: 12px; }
.scm-dash-addr:last-child { padding-left: 12px; }
.scm-dash-addr-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; margin-bottom: 3px; }
.scm-dash-addr strong { color: #1f2937; }
.scm-dash-addr span { color: #6b7280; font-size: 12px; }
@media (max-width: 480px) { .scm-dash-addresses { grid-template-columns: 1fr; } .scm-dash-addr:first-child { border-right: 0; padding-right: 0; border-bottom: 1px solid #f0f0f1; padding-bottom: 10px; } .scm-dash-addr:last-child { padding-left: 0; padding-top: 10px; } }

.scm-dash-item-row { padding: 10px 16px; font-size: 13px; color: #374151; border-bottom: 1px solid #f0f0f1; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.scm-dash-item-row span { color: #6b7280; }
.scm-dash-instructions { padding: 8px 16px; background: #fffbeb; border-top: 1px solid #fde68a; font-size: 12px; color: #92400e; border-bottom: 1px solid #f0f0f1; }

/* Update form */
.scm-dash-update-form { padding: 12px 16px; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.scm-dash-update-row { display: flex; gap: 8px; margin-bottom: 8px; }
.scm-dash-update-row:last-child { margin-bottom: 0; }
.scm-dash-status-sel { flex: 1; }
.scm-dash-loc { flex: 1; }

.scm-dash-empty { text-align: center; padding: 48px 20px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; color: #9ca3af; }

/* ── Thank You Page ──────────────────────────────────────────────────── */
.scm-thankyou-wrap {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.scm-thankyou-hero { text-align: center; padding: 40px 24px 32px; background: linear-gradient(135deg, #059669 0%, #047857 100%); color: #fff; border-radius: 12px 12px 0 0; }
.scm-thankyou-hero .scm-ty-icon { font-size: 56px; margin-bottom: 12px; }
.scm-thankyou-hero h1 { margin: 0 0 8px; font-size: 26px; color: #fff; }
.scm-thankyou-hero p { margin: 0; font-size: 15px; color: rgba(255,255,255,.85); }

.scm-thankyou-body { background: #fff; border: 1px solid #e2e8f0; border-top: 0; border-radius: 0 0 12px 12px; padding: 28px; }

.scm-ty-tracking-box { background: #eff6ff; border: 2px dashed #3b82f6; border-radius: 8px; padding: 20px 24px; text-align: center; margin-bottom: 24px; }
.scm-ty-tracking-label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #6b7280; margin-bottom: 6px; }
.scm-ty-tracking-id { display: block; font-size: 26px; font-weight: 800; color: #2563eb; letter-spacing: 1px; margin-bottom: 12px; }
.scm-ty-copy-btn { padding: 6px 18px; background: transparent; border: 2px solid #2563eb; color: #2563eb; border-radius: 4px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; }
.scm-ty-copy-btn:hover { background: #2563eb; color: #fff; }

.scm-ty-summary { margin-bottom: 24px; }
.scm-ty-summary h3 { font-size: 15px; font-weight: 700; color: #1f2937; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #f0f0f1; }
.scm-ty-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .scm-ty-summary-grid { grid-template-columns: 1fr; } }
.scm-ty-sum-block { background: #f9fafb; border-radius: 8px; padding: 14px 16px; }
.scm-ty-sum-title { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #9ca3af; margin-bottom: 8px; }
.scm-ty-sum-block p { margin: 0 0 4px; font-size: 13px; color: #374151; }
.scm-ty-sum-block strong { color: #1f2937; }

.scm-ty-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.scm-ty-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid;
    transition: all .15s;
    min-width: 140px;
}
.scm-ty-btn--primary { background: #2563eb; color: #fff !important; border-color: #2563eb; }
.scm-ty-btn--primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.scm-ty-btn--secondary { background: transparent; color: #2563eb !important; border-color: #2563eb; }
.scm-ty-btn--secondary:hover { background: #eff6ff; }
.scm-ty-btn--dark { background: #1f2937; color: #fff !important; border-color: #1f2937; }
.scm-ty-btn--dark:hover { background: #111827; }
.scm-ty-btn--outline { background: transparent; color: #1f2937 !important; border-color: #1f2937; }
.scm-ty-btn--outline:hover { background: #f3f4f6; }
.scm-ty-email-note { font-size: 12px; color: #9ca3af; text-align: center; margin-top: 12px; }
