/* Cargo Intelligence — Freight Links Express brand */
:root {
    --ci-ink: #1a1515;
    --ci-navy: #322929;
    --ci-navy-mid: #3f3434;
    --ci-navy-light: #4d4040;
    --ci-slate: #5c5252;
    --ci-primary: #F97316;
    --ci-primary-light: #fb923c;
    --ci-primary-dark: #ea580c;
    --ci-copper: #F97316;
    --ci-copper-light: #fb923c;
    --ci-copper-muted: rgba(249, 115, 22, 0.12);
    --ci-air: #F97316;
    --ci-air-light: #fb923c;
    --ci-air-bg: rgba(249, 115, 22, 0.08);
    --ci-air-border: rgba(249, 115, 22, 0.28);
    --ci-sea: #0e7490;
    --ci-sea-light: #06b6d4;
    --ci-sea-bg: rgba(14, 116, 144, 0.08);
    --ci-sea-border: rgba(14, 116, 144, 0.25);
    --ci-teal: #F97316;
    --ci-teal-light: #fb923c;
    --ci-teal-muted: rgba(249, 115, 22, 0.12);
    --ci-amber: #F97316;
    --ci-amber-light: #fb923c;
    --ci-amber-bg: rgba(249, 115, 22, 0.1);
    --ci-surface: #ffffff;
    --ci-surface-2: #f9f9f9;
    --ci-surface-3: #f0f0f0;
    --ci-border: #e8e8e8;
    --ci-border-strong: #d4d4d4;
    --ci-text: #322929;
    --ci-text-muted: #6b6363;
    --ci-text-light: #9a9292;
    --ci-success: #059669;
    --ci-success-bg: rgba(5, 150, 105, 0.1);
    --ci-warning: #F97316;
    --ci-warning-bg: rgba(249, 115, 22, 0.1);
    --ci-danger: #dc2626;
    --ci-danger-bg: rgba(220, 38, 38, 0.1);
    --ci-info: #F97316;
    --ci-info-bg: rgba(249, 115, 22, 0.1);
    --ci-radius: 14px;
    --ci-radius-lg: 18px;
    --ci-radius-xl: 24px;
    --ci-shadow-sm: 0 1px 2px rgba(50, 41, 41, 0.04), 0 4px 12px rgba(50, 41, 41, 0.04);
    --ci-shadow: 0 8px 24px rgba(50, 41, 41, 0.08), 0 2px 8px rgba(50, 41, 41, 0.04);
    --ci-shadow-lg: 0 20px 48px rgba(50, 41, 41, 0.12), 0 6px 16px rgba(50, 41, 41, 0.06);
    --ci-shadow-air: 0 8px 22px rgba(249, 115, 22, 0.2);
    --ci-shadow-sea: 0 8px 22px rgba(14, 116, 144, 0.16);
    --ci-font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    --ci-font-display: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
    --ci-max-chat: 780px;
    --ci-max-admin: 1280px;
    --ci-gradient-hero: linear-gradient(145deg, #322929 0%, #3f3434 55%, #4a3030 100%);
    --ci-gradient-air: linear-gradient(135deg, #F97316, #fb923c);
    --ci-gradient-sea: linear-gradient(135deg, #0e7490, #06b6d4);
    --ci-gradient-accent: linear-gradient(135deg, #F97316, #fb923c);
    --ci-gradient-copper: linear-gradient(135deg, #F97316, #fb923c);
    --ci-mesh:
        radial-gradient(ellipse 70% 55% at 85% 5%, rgba(249, 115, 22, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 40% at 10% 90%, rgba(249, 115, 22, 0.05), transparent 50%);
    --ci-grid:
        linear-gradient(rgba(50, 41, 41, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 41, 41, 0.035) 1px, transparent 1px);
}

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

body {
    font-family: var(--ci-font);
    color: var(--ci-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
    font-family: var(--ci-font-display);
    color: var(--ci-navy);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: var(--ci-radius);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.12s, box-shadow 0.2s, opacity 0.2s;
    text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
    background: var(--ci-primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}
.btn-primary:hover {
    background: var(--ci-primary-dark);
    box-shadow: 0 8px 22px rgba(249, 115, 22, 0.35);
}
.btn-secondary {
    background: var(--ci-surface);
    color: var(--ci-text);
    border: 1px solid var(--ci-border);
}
.btn-secondary:hover { background: var(--ci-surface-3); }
.btn-danger {
    background: var(--ci-danger-bg);
    color: var(--ci-danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}
.btn-danger:hover { background: rgba(220, 38, 38, 0.16); }
.btn-sm { padding: 7px 12px; font-size: 0.8rem; }
.btn-block { width: 100%; }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ci-text-muted);
    margin-bottom: 8px;
}
.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--ci-border);
    border-radius: var(--ci-radius);
    font-family: inherit;
    font-size: 0.95rem;
    background: var(--ci-surface);
    color: var(--ci-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    outline: none;
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}
.form-control::placeholder { color: var(--ci-text-light); }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.card {
    background: var(--ci-surface);
    border: 1px solid var(--ci-border);
    border-radius: var(--ci-radius-lg);
    padding: 22px;
    box-shadow: var(--ci-shadow-sm);
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ci-primary), rgba(251, 146, 60, 0.4), transparent);
}
.card-title {
    font-family: var(--ci-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    color: var(--ci-navy);
}
.card-sub {
    font-size: 0.85rem;
    color: var(--ci-text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.badge-uploaded { background: var(--ci-info-bg); color: var(--ci-primary-dark); }
.badge-tabulated { background: var(--ci-warning-bg); color: var(--ci-primary-dark); }
.badge-imported { background: var(--ci-success-bg); color: var(--ci-success); }
.badge-failed { background: var(--ci-danger-bg); color: var(--ci-danger); }

.alert {
    padding: 12px 16px;
    border-radius: var(--ci-radius);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.alert-error {
    background: var(--ci-danger-bg);
    color: var(--ci-danger);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.brand-logo {
    display: block;
    height: 36px;
    width: auto;
    object-fit: contain;
}
.brand-logo-lg {
    height: 48px;
}
.brand-logo-sm {
    height: 28px;
}

@keyframes ci-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ci-glow {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
