/* Advanced Order Tracking — Frontend (Minimalist) */

.aot-wrap {
    max-width: 820px;
    margin: 0 auto;
    padding: 24px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    line-height: 1.5;
}

/* Search */
.aot-search-box {
    text-align: center;
    padding: 48px 24px 44px;
    background: #1e293b;
    border-radius: 12px;
    margin-bottom: 28px;
}
.aot-search-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
    letter-spacing: -0.3px;
}
.aot-search-sub {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 24px;
}
.aot-search-form {
    max-width: 480px;
    margin: 0 auto;
}
.aot-input-group {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.aot-input {
    flex: 1;
    border: none;
    padding: 14px 16px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #1e293b;
    min-width: 0;
}
.aot-input::placeholder { color: #94a3b8; }
.aot-btn {
    padding: 14px 28px;
    background: #3b82f6;
    color: #fff;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.aot-btn:hover { background: #2563eb; }

/* Error */
.aot-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* ── Hero (Courier + Status) ── */
.aot-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
}
.aot-hero-courier {
    display: flex;
    align-items: center;
    gap: 12px;
}
.aot-hero-courier img {
    display: block;
    border-radius: 6px;
}
.aot-hero-courier-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.aot-hero-status {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aot-hero-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.aot-hero-status-text {
    font-size: 15px;
    font-weight: 700;
}

/* ── Info Bar (AWB / Reference / Booked) ── */
.aot-info-bar {
    display: flex;
    align-items: stretch;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
}
.aot-info-block {
    flex: 1;
    padding: 14px 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.aot-info-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aot-info-value {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    word-break: break-all;
}
.aot-info-sep {
    width: 1px;
    background: #e2e8f0;
    align-self: stretch;
}
.aot-highlight { color: #3b82f6; }

/* Route Full (verified view) */
.aot-route-full {
    border-radius: 0;
    border-top: none;
}

/* ── Timeline Header ── */
.aot-tl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 8px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.aot-tl-count {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
}

/* Timeline */
.aot-timeline {
    padding: 0 8px;
}
.aot-tl-item {
    display: flex;
    gap: 16px;
}
.aot-tl-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 16px;
    flex-shrink: 0;
    padding-top: 18px;
}
.aot-tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    background: #fff;
    z-index: 2;
    flex-shrink: 0;
}
.aot-tl-dot.completed { border-color: #16a34a; background: #16a34a; }
.aot-tl-dot.active { border-color: #f97316; background: #f97316; box-shadow: 0 0 0 3px rgba(249,115,22,0.15); }
.aot-tl-line {
    width: 2px;
    flex: 1;
    min-height: 20px;
    background: #e2e8f0;
    margin: 3px 0;
}
.aot-tl-line.completed { background: #16a34a; }
.aot-tl-line.active { background: linear-gradient(to bottom, #f97316, #e2e8f0); }

/* Timeline Card */
.aot-tl-card {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
}
.aot-tl-card.completed { border-left: 2px solid #16a34a; }
.aot-tl-card.active { border-left: 2px solid #f97316; background: #fffbf5; }
.aot-tl-card.pending { opacity: 0.45; }
.aot-tl-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.aot-tl-info { flex: 1; }
.aot-tl-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 4px;
}
.aot-tl-card.pending .aot-tl-title { color: #94a3b8; }
.aot-tl-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 2px;
}
.aot-tl-loc {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 500;
}

/* Timeline Icon */
.aot-tl-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #94a3b8;
    flex-shrink: 0;
}
.aot-tl-icon.completed { background: #f0fdf4; color: #16a34a; }
.aot-tl-icon.active { background: #fff7ed; color: #f97316; }

/* ── Summary Card (Delhivery-style) ── */
.aot-summary-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.aot-summary-top {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aot-summary-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aot-summary-date {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.3px;
}
.aot-summary-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
    flex-shrink: 0;
}
.aot-summary-awb {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.aot-copy-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #3b82f6;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.15s;
}
.aot-copy-btn:hover { background: #dbeafe; }

/* ── Courier Strip (above summary) ── */
.aot-courier-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
}
.aot-courier-strip-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.aot-courier-strip-logo img {
    display: block;
    border-radius: 6px;
}
.aot-courier-strip-name {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}
.aot-courier-strip-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.aot-summary-card.aot-has-courier {
    border-radius: 0;
    border-top: none;
}

/* ── Courier Header (verified view) ── */
.aot-courier-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
    margin-bottom: -1px;
}
.aot-courier-header img {
    display: block;
    border-radius: 6px;
}
.aot-courier-header .aot-courier-text {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}
.aot-courier-label {
    font-size: 11px;
    color: #94a3b8;
    margin-left: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* ── Route Bar (Origin → Destination) ── */
.aot-route-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-top: none;
}
.aot-route-point {
    display: flex;
    align-items: center;
    gap: 8px;
}
.aot-route-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.aot-route-label {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.aot-route-city {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.aot-route-line {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Tabs */
.aot-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-top: -1px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}
.aot-tab {
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    cursor: pointer;
    position: relative;
    transition: color 0.15s;
}
.aot-tab:hover { color: #64748b; }
.aot-tab-active {
    color: #1e293b;
}
.aot-tab-active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #3b82f6;
}

/* Brief Status */
.aot-brief-status {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
}
.aot-brief-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.aot-brief-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.aot-brief-label {
    font-size: 14px;
    font-weight: 700;
}
.aot-brief-desc {
    font-size: 12px;
    color: #64748b;
}

/* ── Locked / Verify Section ── */
.aot-locked-section {
    position: relative;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    min-height: 260px;
}
.aot-locked-blur {
    filter: blur(5px);
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
    padding: 20px 24px 60px;
}
.aot-locked-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #475569;
}
.aot-locked-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

/* Verify Gate Overlay */
.aot-locked-gate {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    background: rgba(255,255,255,0.55);
    backdrop-filter: blur(2px);
    text-align: center;
    padding: 24px;
}
.aot-gate-title {
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
    letter-spacing: -0.2px;
}
.aot-gate-sub {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 18px;
}
.aot-gate-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 340px;
}
.aot-gate-input {
    padding: 13px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    text-align: center;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.aot-gate-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}
.aot-gate-input::placeholder { color: #94a3b8; }
.aot-gate-btn {
    padding: 13px 24px;
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.aot-gate-btn:hover { background: #1e293b; transform: translateY(-1px); }
.aot-gate-btn:active { transform: translateY(0); }
.aot-gate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Verify Error (shared) */
.aot-verify-error {
    color: #dc2626;
    font-size: 13px;
    margin: 10px 0 0;
    padding: 8px 12px;
    background: #fef2f2;
    border-radius: 6px;
    max-width: 340px;
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .aot-summary-card { flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px 18px; }
    .aot-summary-divider { width: 100%; height: 1px; }
    .aot-route-bar { flex-direction: column; gap: 10px; align-items: flex-start; padding: 14px 18px; }
    .aot-route-line { transform: rotate(90deg); margin: -4px 0 -4px 20px; }
    .aot-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
    .aot-info-bar { flex-direction: column; }
    .aot-info-sep { width: 100%; height: 1px; }
    .aot-info-block { padding: 10px 18px; }
    .aot-courier-strip { padding: 12px 18px; }
    .aot-brief-status { padding: 14px 18px; }
    .aot-locked-section { min-height: 220px; }
    .aot-locked-gate { padding: 20px 16px; }
    .aot-gate-form { max-width: 100%; }
    .aot-tabs { overflow-x: auto; }
}
@media (max-width: 480px) {
    .aot-wrap { padding: 16px 10px; }
    .aot-search-box { padding: 28px 14px 24px; margin-bottom: 20px; }
    .aot-search-title { font-size: 18px; }
    .aot-search-sub { font-size: 12px; }
    .aot-input { padding: 12px 12px; font-size: 13px; }
    .aot-btn { padding: 12px 18px; font-size: 13px; }
    .aot-summary-card { padding: 14px 14px; gap: 10px; }
    .aot-summary-date { font-size: 17px; }
    .aot-summary-label { font-size: 10px; }
    .aot-summary-awb { font-size: 12px; }
    .aot-copy-btn { font-size: 10px; padding: 3px 8px; }
    .aot-courier-strip { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 14px; }
    .aot-courier-strip-logo img { height: 28px; }
    .aot-courier-strip-name { font-size: 13px; }
    .aot-tab { padding: 10px 14px; font-size: 12px; }
    .aot-brief-status { padding: 12px 14px; gap: 10px; }
    .aot-brief-label { font-size: 13px; }
    .aot-brief-desc { font-size: 11px; }
    .aot-route-bar { padding: 12px 14px; gap: 8px; }
    .aot-route-city { font-size: 12px; }
    .aot-route-line svg { width: 50px; }
    .aot-locked-section { min-height: 200px; }
    .aot-locked-gate { padding: 16px 12px; }
    .aot-gate-title { font-size: 15px; }
    .aot-gate-sub { font-size: 12px; margin-bottom: 14px; }
    .aot-gate-input { padding: 11px 12px; font-size: 13px; }
    .aot-gate-btn { padding: 11px 18px; font-size: 13px; }
    .aot-tl-body { flex-direction: column-reverse; gap: 8px; }
    .aot-tl-icon { width: 32px; height: 32px; }
    .aot-tl-icon svg { width: 18px; height: 18px; }
    .aot-tl-card { padding: 10px 12px; }
    .aot-tl-title { font-size: 13px; }
    .aot-tl-meta { font-size: 11px; gap: 8px; }
    .aot-hero { padding: 14px; }
    .aot-hero-courier-name { font-size: 14px; }
    .aot-hero-status-text { font-size: 13px; }
    .aot-info-block { padding: 8px 14px; }
    .aot-info-value { font-size: 12px; }
    .aot-tl-header { padding: 12px 4px 8px; font-size: 13px; }
}
