/* ============================================================
   SafeDrop Order Tracking Platform - Main Stylesheet
   ============================================================ */

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

:root {
    --green-dark:  #1a4731;
    --green-main:  #2d6a4f;
    --green-light: #52b788;
    --green-btn:   #1e4d2b;
    --footer-bg:   #d8e8d8;
    --text-dark:   #222;
    --text-mid:    #444;
    --text-light:  #777;
    --white:       #ffffff;
    --border:      #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ── HEADER ─────────────────────────────────────────────── */
header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 40px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.header-logo-img {
    height: 72px;
    width: auto;
    object-fit: contain;
    display: block;
}

.logo-box {
    width: 80px;
    height: 80px;
    border: 2px solid var(--green-main);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    position: relative;
}

.logo-arc {
    font-size: 7px;
    font-weight: 700;
    color: var(--green-main);
    letter-spacing: 1px;
    text-transform: uppercase;
    position: absolute;
    top: 4px;
    width: 100%;
    text-align: center;
}

.logo-drop {
    width: 28px;
    height: 36px;
    background: var(--green-main);
    clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
    margin: 14px 0 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-drop-inner {
    width: 12px;
    height: 16px;
    background: #fff;
    clip-path: polygon(50% 0%, 100% 35%, 80% 100%, 20% 100%, 0% 35%);
}

.logo-text-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2px;
}

.logo-the {
    font-size: 8px;
    color: var(--green-dark);
    font-weight: 600;
    letter-spacing: 2px;
}

.logo-safedrop {
    font-size: 14px;
    font-weight: 900;
    color: var(--green-dark);
    letter-spacing: 1px;
    line-height: 1;
}

.logo-subtitle {
    font-size: 7px;
    color: var(--green-main);
    letter-spacing: 0.5px;
    text-align: center;
}

.logo-badge {
    font-size: 6px;
    color: var(--green-dark);
    position: absolute;
    bottom: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

header nav a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.2s;
    position: relative;
}

header nav a:hover,
header nav a.active {
    color: var(--green-main);
}

header nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0; right: 0;
    height: 2px;
    background: var(--green-main);
    border-radius: 2px;
}

.btn-call {
    background: var(--green-btn);
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.btn-call:hover {
    background: #142e1c;
    transform: translateY(-1px);
}

/* ── MAIN CONTENT ────────────────────────────────────────── */
main {
    flex: 1;
}

/* ── HERO / SEARCH SECTION ───────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #e8f5e9 0%, #f0f7f0 50%, #e0f0e8 100%);
    padding: 80px 20px;
    text-align: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--green-dark);
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--text-mid);
    margin-bottom: 40px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    border-radius: 8px;
    overflow: hidden;
}

.search-box input {
    flex: 1;
    padding: 18px 24px;
    font-size: 17px;
    border: 2px solid var(--green-main);
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    color: var(--text-dark);
    background: #fff;
}

.search-box input::placeholder { color: #aaa; }

.search-box input:focus {
    border-color: var(--green-dark);
}

.search-box button {
    padding: 18px 32px;
    background: var(--green-btn);
    color: #fff;
    border: 2px solid var(--green-btn);
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    letter-spacing: 0.5px;
}

.search-box button:hover { background: #142e1c; }

/* ── TRACKING RESULT ─────────────────────────────────────── */
.track-section {
    padding: 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.track-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.track-card-header {
    background: var(--green-btn);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.track-card-header h2 { font-size: 20px; font-weight: 700; }

.track-card-body {
    padding: 30px;
}

.track-row {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    padding: 14px 0;
    align-items: flex-start;
}

.track-row:last-child { border-bottom: none; }

.track-label {
    width: 200px;
    font-weight: 600;
    color: var(--text-mid);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.track-value {
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-delivered   { background: #d4edda; color: #155724; }
.status-transit     { background: #fff3cd; color: #856404; }
.status-pending     { background: #f8d7da; color: #721c24; }
.status-processing  { background: #d1ecf1; color: #0c5460; }
.status-default     { background: #e2e3e5; color: #383d41; }

.alert-error {
    background: #fff0f0;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px 24px;
    text-align: center;
    color: #721c24;
    font-size: 16px;
}

.alert-error .icon { font-size: 36px; margin-bottom: 10px; }

/* ── INFO STRIPS ─────────────────────────────────────────── */
.features-strip {
    background: var(--green-dark);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
}

.features-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.feature-item { text-align: center; }
.feature-item .icon { font-size: 36px; margin-bottom: 10px; }
.feature-item h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-item p { font-size: 13px; color: #b0d0b8; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
    background: #d4e8d4;
    padding: 50px 60px 0;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1.4fr 1.4fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #b8d4b8;
}

.footer-logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    display: block;
    margin-bottom: 14px;
}

.footer-brand .footer-logo-text {
    font-size: 28px;
    font-weight: 900;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.footer-logo-text .safe { font-weight: 400; }
.footer-logo-text .drop { font-style: italic; }
.footer-logo-the {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--text-dark);
    margin-bottom: 2px;
}
.footer-tagline {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 14px;
    color: var(--text-mid);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social { display: flex; gap: 12px; }

.social-icon {
    width: 38px;
    height: 38px;
    background: var(--text-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
}

.social-icon:hover { background: var(--green-main); transform: translateY(-2px); }

.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    font-size: 14px;
    color: var(--text-mid);
    transition: color 0.2s;
}

.footer-col ul li a:hover { color: var(--green-main); }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.contact-icon {
    width: 22px;
    height: 22px;
    background: var(--text-dark);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
}

.contact-icon.round { border-radius: 50%; }
.contact-icon.green-icon { background: var(--green-main); }

.contact-text { font-size: 14px; color: var(--text-mid); line-height: 1.5; }

.footer-map {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #b0c8b0;
    height: 180px;
}

.footer-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.footer-bottom {
    text-align: center;
    padding: 18px 0;
    font-size: 13px;
    color: var(--text-mid);
}

.footer-bottom a { color: var(--text-dark); font-weight: 600; }

/* ── FLOATING BUTTONS ────────────────────────────────────── */
.float-call {
    position: fixed;
    bottom: 30px;
    left: 24px;
    width: 52px;
    height: 52px;
    background: var(--green-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 999;
    animation: pulse 2s infinite;
}

.float-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 24px;
    width: 52px;
    height: 52px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 999;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(0,0,0,0.25); }
    50% { box-shadow: 0 4px 22px rgba(46,107,79,0.5); }
}

/* ── ADMIN STYLES ────────────────────────────────────────── */
.admin-body {
    background: #f4f6f9;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.admin-wrap {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--green-dark);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 28px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.sidebar-brand .brand-name {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
}

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

.sidebar-nav { padding: 20px 0; flex: 1; }

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

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--green-light);
}

.sidebar-nav a .nav-icon { font-size: 18px; width: 22px; text-align: center; }

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    color: rgba(255,255,255,0.4);
}

.admin-main {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    background: #fff;
    padding: 16px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.admin-topbar h1 { font-size: 20px; font-weight: 700; color: var(--text-dark); }

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-mid);
}

.admin-user .avatar {
    width: 36px;
    height: 36px;
    background: var(--green-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.admin-content { padding: 30px; flex: 1; }

/* ── ADMIN CARDS ─────────────────────────────────────────── */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--green-main);
}

.stat-card.orange { border-left-color: #f39c12; }
.stat-card.blue   { border-left-color: #3498db; }
.stat-card.red    { border-left-color: #e74c3c; }

.stat-icon {
    width: 52px;
    height: 52px;
    background: #e8f5e9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card.orange .stat-icon { background: #fef9e7; }
.stat-card.blue   .stat-icon { background: #ebf5fb; }
.stat-card.red    .stat-icon { background: #fdf2f2; }

.stat-num { font-size: 28px; font-weight: 800; color: var(--text-dark); }
.stat-label { font-size: 13px; color: var(--text-light); }

/* ── ADMIN PANEL/TABLE ───────────────────────────────────── */
.panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-header h3 { font-size: 16px; font-weight: 700; color: var(--text-dark); }

.panel-body { padding: 24px; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

table thead th {
    background: #f8f9fa;
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e9ecef;
}

table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-dark);
}

table tbody tr:hover { background: #fafafa; }
table tbody tr:last-child td { border-bottom: none; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary   { background: var(--green-main); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-danger    { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning   { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-secondary:hover { background: #545b62; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ── EXCEL FORMAT PREVIEW TABLE ──────────────────────────── */
.format-preview-table {
    width: auto;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 13px;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    overflow: hidden;
}

.format-preview-table thead th {
    background: #2d6a4f;
    color: #fff;
    padding: 9px 14px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: none;
    font-weight: 700;
}

.format-preview-table tbody td {
    padding: 8px 14px;
    border-bottom: 1px solid #e8f5e9;
    color: #333;
    background: #fff;
}

.format-preview-table tbody tr:last-child td { border-bottom: none; }
.format-preview-table tbody tr:nth-child(odd) td { background: #f4fbf6; }

/* ── UPLOAD FORM ─────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--green-light);
    border-radius: 10px;
    padding: 48px 24px;
    text-align: center;
    background: #f0faf4;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--green-main);
    background: #e6f7ed;
}

.upload-zone .upload-icon { font-size: 52px; margin-bottom: 14px; }
.upload-zone p { font-size: 16px; color: var(--text-mid); margin-bottom: 8px; }
.upload-zone small { color: var(--text-light); font-size: 13px; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    color: var(--text-dark);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--green-main);
}

.alert {
    padding: 14px 18px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 20px;
}

.alert-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger  { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info    { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* ── LOGIN PAGE ──────────────────────────────────────────── */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a4731 0%, #2d6a4f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: #fff;
    border-radius: 14px;
    padding: 48px 40px;
    width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-card .login-logo h2 {
    font-size: 26px;
    font-weight: 900;
    color: var(--green-dark);
    margin-bottom: 4px;
}

.login-card .login-logo p {
    font-size: 13px;
    color: var(--text-light);
}

.login-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
    text-align: center;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #ddd;
    color: var(--text-dark);
    transition: all 0.2s;
}

.pagination a:hover { background: var(--green-main); color: #fff; border-color: var(--green-main); }
.pagination .current { background: var(--green-main); color: #fff; border-color: var(--green-main); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 992px) {
    header { padding: 0 20px; }
    header nav { gap: 20px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 28px; }
    .search-box { flex-direction: column; border-radius: 8px; }
    .search-box input { border-right: 2px solid var(--green-main); border-bottom: none; border-radius: 8px 8px 0 0; }
    .search-box button { border-radius: 0 0 8px 8px; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-sidebar { width: 200px; }
    .admin-main { margin-left: 200px; }
    header nav { display: none; }
    .features-grid { gap: 30px; }
}
