/* DottExp - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Barlow:wght@400;600;700;800&display=swap');

:root {
    --primary: #4A0072;
    --primary-dark: #2d0047;
    --accent: #FF6B00;
    --accent-light: #FF8C33;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-400: #9ca3af;
    --gray-600: #4b5563;
    --gray-800: #1f2937;
    --green: #16a34a;
    --green-light: #dcfce7;
    --red: #dc2626;
    --red-light: #fee2e2;
    --yellow: #d97706;
    --yellow-light: #fef3c7;
    --blue: #1d4ed8;
    --blue-light: #dbeafe;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* ── HEADER ── */
.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(74,0,114,0.3);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-mark {
    background: var(--accent);
    color: white;
    font-family: 'Barlow', sans-serif;
    font-weight: 800;
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 6px;
    letter-spacing: 1px;
}

.logo-text {
    color: white;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 2px;
}

.logo-sub {
    color: rgba(255,255,255,0.6);
    font-size: 11px;
    letter-spacing: 1px;
    display: block;
    margin-top: -4px;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.header-nav a:hover { color: white; }

.btn-track-header {
    background: var(--accent);
    color: white !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600 !important;
    transition: background 0.2s !important;
}

.btn-track-header:hover { background: var(--accent-light) !important; }

/* ── HERO ── */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #1a0030 100%);
    padding: 80px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,107,0,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,107,0,0.15);
    border: 1px solid rgba(255,107,0,0.3);
    color: var(--accent-light);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: 'Barlow', sans-serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero h1 span { color: var(--accent); }

.hero p {
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    max-width: 520px;
    margin: 0 auto 40px;
}

/* ── TRACK FORM ── */
.track-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 680px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
}

.track-box h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-800);
}

.track-input-group {
    display: flex;
    gap: 12px;
}

.track-input-group input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    letter-spacing: 1px;
    transition: border-color 0.2s;
    outline: none;
}

.track-input-group input:focus { border-color: var(--primary); }

.track-input-group input::placeholder { color: var(--gray-400); font-weight: 400; letter-spacing: 0; }

.btn-primary {
    background: var(--accent);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
}

.btn-primary:hover { background: var(--accent-light); }
.btn-primary:active { transform: scale(0.98); }

.track-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--gray-400);
}

/* ── FEATURES STRIP ── */
.features-strip {
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 48px 24px;
}

.features-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: rgba(74,0,114,0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-item p {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
}

/* ── SERVICES ── */
.services-section {
    padding: 72px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-eyebrow {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-header h2 {
    font-family: 'Barlow', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--gray-800);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    transition: box-shadow 0.2s, transform 0.2s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
}

.service-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.service-card .icon { font-size: 36px; margin-bottom: 16px; }
.service-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.service-card p { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

/* ── STATS BAR ── */
.stats-bar {
    background: var(--primary);
    padding: 48px 24px;
}

.stats-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item h3 {
    font-family: 'Barlow', sans-serif;
    font-size: 42px;
    font-weight: 800;
    color: var(--accent);
}

.stat-item p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-top: 4px;
}

/* ── FOOTER ── */
.site-footer {
    background: var(--gray-800);
    color: rgba(255,255,255,0.7);
    padding: 56px 24px 24px;
}

.footer-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .logo-mark { font-size: 16px; }
.footer-brand .logo-text { font-size: 18px; }
.footer-brand p { font-size: 13px; margin-top: 12px; line-height: 1.7; }

.footer-col h4 {
    color: white;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 13px; transition: color 0.2s; }
.footer-col ul li a:hover { color: white; }

.footer-bottom {
    max-width: 1100px;
    margin: 24px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

/* ── TRACKING PAGE ── */
.track-page {
    max-width: 900px;
    margin: 48px auto;
    padding: 0 24px;
}

.track-header-bar {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.tracking-number-display {
    font-family: 'Barlow', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
}

.status-badge {
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-placed { background: var(--gray-100); color: var(--gray-600); }
.status-picked { background: var(--blue-light); color: var(--blue); }
.status-transit { background: var(--yellow-light); color: var(--yellow); }
.status-sorting { background: var(--yellow-light); color: var(--yellow); }
.status-local { background: var(--blue-light); color: var(--blue); }
.status-out { background: rgba(74,0,114,0.1); color: var(--primary); }
.status-delivered { background: var(--green-light); color: var(--green); }
.status-delayed { background: var(--red-light); color: var(--red); }

.progress-bar-wrap {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.progress-track {
    background: var(--gray-200);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    transition: width 1s ease;
}

.shipment-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.detail-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.detail-card h3 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.detail-row span:first-child { color: var(--gray-600); }
.detail-row span:last-child { font-weight: 600; text-align: right; }

/* ── TIMELINE ── */
.timeline-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
}

.timeline-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--gray-800);
}

.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 8px;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 28px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
    position: absolute;
    left: -33px;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gray-200);
    border: 3px solid var(--gray-200);
    z-index: 1;
}

.timeline-item.reached .timeline-dot {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(255,107,0,0.15);
}

.timeline-item.current .timeline-dot {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(74,0,114,0.15);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 4px rgba(74,0,114,0.15); }
    50% { box-shadow: 0 0 0 8px rgba(74,0,114,0.05); }
    100% { box-shadow: 0 0 0 4px rgba(74,0,114,0.15); }
}

.timeline-content { opacity: 0.4; }
.timeline-item.reached .timeline-content,
.timeline-item.current .timeline-content { opacity: 1; }

.timeline-status {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2px;
}

.timeline-location {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.timeline-time {
    font-size: 12px;
    color: var(--gray-400);
}

/* ── NOT FOUND ── */
.not-found-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 64px 32px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.not-found-box .icon { font-size: 56px; margin-bottom: 20px; }
.not-found-box h2 { font-size: 22px; font-weight: 700; margin-bottom: 12px; }
.not-found-box p { color: var(--gray-600); margin-bottom: 28px; }

/* ── ADMIN ── */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--primary-dark);
    padding: 0;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

.sidebar-logo {
    padding: 24px 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-nav {
    padding: 16px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav a .nav-icon { font-size: 18px; width: 24px; }

.admin-main {
    margin-left: 260px;
    flex: 1;
    background: var(--gray-50);
}

.admin-topbar {
    background: white;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-topbar h1 { font-size: 20px; font-weight: 700; }

.admin-content { padding: 32px; }

.stats-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.stat-card .stat-number {
    font-family: 'Barlow', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
}

.stat-card .stat-label { font-size: 13px; color: var(--gray-600); margin-top: 4px; }

.admin-table-wrap {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.table-header h2 { font-size: 16px; font-weight: 700; }

table { width: 100%; border-collapse: collapse; }
thead th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-400);
    border-bottom: 1px solid var(--gray-200);
}

tbody td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--gray-100);
}

tbody tr:hover { background: var(--gray-50); }
tbody tr:last-child td { border-bottom: none; }

.btn-sm {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-danger { background: var(--red-light); color: var(--red); }
.btn-success { background: var(--green-light); color: var(--green); }
.btn-secondary { background: var(--gray-100); color: var(--gray-600); }

/* ── FORMS ── */
.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    max-width: 900px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin: 28px 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(74,0,114,0.1);
}

.form-section-title:first-child { margin-top: 0; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width { grid-column: 1 / -1; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    outline: none;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--primary); }

.form-group textarea { resize: vertical; min-height: 80px; }

.stops-container { margin-top: 8px; }

.stop-row {
    display: grid;
    grid-template-columns: auto 1fr 1fr 2fr 80px 36px;
    gap: 12px;
    align-items: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 8px;
}

.stop-number {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.stop-row input, .stop-row select {
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.stop-row input:focus, .stop-row select:focus { border-color: var(--primary); }

.btn-remove-stop {
    background: var(--red-light);
    color: var(--red);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-stop {
    background: rgba(74,0,114,0.08);
    color: var(--primary);
    border: 1.5px dashed rgba(74,0,114,0.3);
    border-radius: var(--radius);
    padding: 10px;
    width: 100%;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
    transition: background 0.2s;
}

.btn-add-stop:hover { background: rgba(74,0,114,0.12); }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.btn-submit {
    background: var(--primary);
    color: white;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s;
}

.btn-submit:hover { background: var(--primary-dark); }

.btn-cancel {
    background: var(--gray-100);
    color: var(--gray-600);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

/* ── LOGIN ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 24px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.login-card .logo { justify-content: center; margin-bottom: 8px; }
.login-card .login-sub { text-align: center; color: var(--gray-400); font-size: 14px; margin-bottom: 32px; }

.login-card .form-group { margin-bottom: 16px; }

.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-error { background: var(--red-light); color: var(--red); }
.alert-success { background: var(--green-light); color: var(--green); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .header-nav { display: none; }
    .track-input-group { flex-direction: column; }
    .shipment-details-grid { grid-template-columns: 1fr; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .stats-cards { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .form-grid { grid-template-columns: 1fr; }
    .stop-row { grid-template-columns: auto 1fr 1fr; }
}
