/* ==========================================================================
   DHL Logistics Mock - Estilos corporativos DHL
   Colores: Amarillo #FFCC00, Rojo #D40511, Gris oscuro #333
   ========================================================================== */

:root {
    --dhl-yellow: #FFCC00;
    --dhl-red: #D40511;
    --dhl-dark: #333333;
    --dhl-gray: #666666;
    --dhl-light: #F5F5F5;
    --dhl-white: #FFFFFF;
    --dhl-green: #2E8B57;
    --dhl-orange: #FF8C00;
    --dhl-blue: #1A73E8;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--dhl-dark);
    background: var(--dhl-light);
    line-height: 1.6;
}

/* Header */
.header {
    background: var(--dhl-red);
    color: var(--dhl-white);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dhl-white);
}
.header-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}
.header-logo .logo-sub {
    font-size: 0.75rem;
    opacity: 0.85;
}
.header-nav { display: flex; gap: 1.5rem; }
.header-nav a {
    color: var(--dhl-white);
    text-decoration: none;
    font-size: 0.9rem;
    opacity: 0.9;
    transition: opacity 0.2s;
}
.header-nav a:hover { opacity: 1; text-decoration: underline; }

/* Footer */
.footer {
    background: var(--dhl-dark);
    color: var(--dhl-white);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* Container */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Cards */
.card {
    background: var(--dhl-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-header {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--dhl-yellow);
}

/* Hero (tracking search) */
.hero {
    background: linear-gradient(135deg, var(--dhl-red), #b8040e);
    color: var(--dhl-white);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: 0 0 var(--radius) var(--radius);
}
.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}
.search-box {
    display: flex;
    gap: 0.5rem;
    max-width: 600px;
    margin: 0 auto;
}
.search-box input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
}
.search-box button {
    padding: 0.75rem 1.5rem;
    background: var(--dhl-yellow);
    color: var(--dhl-dark);
    border: none;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}
.search-box button:hover { background: #e6b800; }

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.quick-link {
    display: block;
    padding: 1.25rem;
    background: var(--dhl-white);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--dhl-dark);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}
.quick-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.quick-link .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.quick-link h3 { font-size: 1rem; }
.quick-link p { font-size: 0.8rem; color: var(--dhl-gray); margin-top: 0.25rem; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #ddd;
}
.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
    padding-left: 1.5rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.6rem;
    top: 0.3rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #ddd;
    background: var(--dhl-white);
}
.timeline-item.completed::before { background: var(--dhl-green); border-color: var(--dhl-green); }
.timeline-item.current::before { background: var(--dhl-yellow); border-color: var(--dhl-yellow); }
.timeline-item.incident::before { background: var(--dhl-red); border-color: var(--dhl-red); }
.timeline-item .time { font-size: 0.8rem; color: var(--dhl-gray); }
.timeline-item .location { font-weight: 600; }
.timeline-item .desc { font-size: 0.9rem; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-picked_up { background: #E3F2FD; color: #1565C0; }
.badge-in_transit { background: #FFF8E1; color: #F57F17; }
.badge-in_customs { background: #F3E5F5; color: #7B1FA2; }
.badge-out_for_delivery { background: #E8F5E9; color: #2E7D32; }
.badge-delivered { background: #C8E6C9; color: #1B5E20; }
.badge-incident { background: #FFEBEE; color: #C62828; }
.badge-scheduled { background: #E3F2FD; color: #1565C0; }
.badge-completed { background: #C8E6C9; color: #1B5E20; }
.badge-cancelled { background: #FFEBEE; color: #C62828; }

/* Shipment info */
.shipment-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.shipment-info .info-item { margin-bottom: 0.5rem; }
.shipment-info .label { font-size: 0.8rem; color: var(--dhl-gray); text-transform: uppercase; }
.shipment-info .value { font-weight: 600; }

/* Quote table */
.quote-table { width: 100%; border-collapse: collapse; }
.quote-table th {
    background: var(--dhl-yellow);
    color: var(--dhl-dark);
    padding: 0.75rem;
    text-align: left;
}
.quote-table td { padding: 0.75rem; border-bottom: 1px solid #eee; }
.quote-table tr:hover { background: #f9f9f9; }
.price { font-size: 1.3rem; font-weight: 700; color: var(--dhl-red); }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--dhl-gray);
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-size: 0.9rem;
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--dhl-yellow);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    text-decoration: none;
    text-align: center;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--dhl-red); color: var(--dhl-white); }
.btn-primary:hover { background: #b8040e; }
.btn-secondary { background: var(--dhl-yellow); color: var(--dhl-dark); }
.btn-secondary:hover { background: #e6b800; }
.btn-danger { background: #dc3545; color: var(--dhl-white); }
.btn-danger:hover { background: #c82333; }
.btn-sm { padding: 0.3rem 0.8rem; font-size: 0.8rem; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--dhl-red);
    color: var(--dhl-red);
}
.btn-outline:hover { background: var(--dhl-red); color: var(--dhl-white); }

/* Pickup confirmation */
.confirmation-header {
    text-align: center;
    padding: 2rem;
    background: #E8F5E9;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}
.confirmation-header .check { font-size: 3rem; }
.confirmation-header h2 { color: var(--dhl-green); }
.confirmation-id { font-size: 1.5rem; font-weight: 700; color: var(--dhl-dark); }

/* ==========================================================================
   Admin Panel
   ========================================================================== */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: calc(100vh - 60px);
}

/* Sidebar */
.admin-sidebar {
    background: var(--dhl-dark);
    color: var(--dhl-white);
    padding: 1.5rem 0;
}
.admin-sidebar h2 {
    padding: 0 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.6;
    margin-bottom: 1rem;
}
.admin-sidebar a {
    display: block;
    padding: 0.65rem 1rem;
    color: var(--dhl-white);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255, 204, 0, 0.15);
    border-left: 3px solid var(--dhl-yellow);
}

/* Admin content */
.admin-content { padding: 1.5rem 2rem; background: var(--dhl-light); }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.admin-header h1 { font-size: 1.5rem; }

/* Dashboard cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.dash-card {
    background: var(--dhl-white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    text-align: center;
    text-decoration: none;
    color: var(--dhl-dark);
    transition: transform 0.2s;
}
.dash-card:hover { transform: translateY(-2px); }
.dash-card .count { font-size: 2rem; font-weight: 700; color: var(--dhl-red); }
.dash-card .label { font-size: 0.85rem; color: var(--dhl-gray); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; background: var(--dhl-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th {
    background: var(--dhl-dark);
    color: var(--dhl-white);
    padding: 0.7rem 0.75rem;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.data-table td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #eee; font-size: 0.85rem; }
.data-table tr:hover { background: #f9f9f9; }
.data-table .actions { white-space: nowrap; }
.data-table .actions button { margin-right: 0.25rem; }

/* Inline edit */
.inline-edit { display: none; }
.inline-edit.active { display: table-row; }
.inline-edit td { background: #FFFDE7; }
.inline-edit input, .inline-edit select {
    width: 100%;
    padding: 0.3rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Modal-like add form */
.add-form {
    display: none;
    background: var(--dhl-white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 2px solid var(--dhl-yellow);
}
.add-form.active { display: block; }
.add-form h3 { margin-bottom: 1rem; }

/* Alerts */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}
.alert-success { background: #E8F5E9; color: #1B5E20; border: 1px solid #A5D6A7; }
.alert-error { background: #FFEBEE; color: #C62828; border: 1px solid #EF9A9A; }
.alert-info { background: #E3F2FD; color: #1565C0; border: 1px solid #90CAF9; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--dhl-gray);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; overflow-x: auto; padding: 0.5rem; }
    .admin-sidebar h2 { display: none; }
    .admin-sidebar a { white-space: nowrap; padding: 0.5rem 0.75rem; }
    .shipment-info { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.5rem; }
    .search-box { flex-direction: column; }
    .header { flex-direction: column; gap: 0.5rem; padding: 0.5rem 1rem; }
}
