/* ============================================
   Fulfillment WMS - Styles
   Full RTL/LTR Support
   ============================================ */

:root {
    --ff-primary: #6366f1;
    --ff-primary-dark: #4f46e5;
    --ff-primary-light: #818cf8;
    --ff-sidebar-bg: #0f172a;
    --ff-sidebar-hover: #1e293b;
    --ff-sidebar-active: #6366f1;
    --ff-sidebar-text: #94a3b8;
    --ff-sidebar-text-active: #ffffff;
    --ff-sidebar-width: 260px;
    --ff-sidebar-collapsed: 65px;
    --ff-topbar-height: 56px;
    --ff-bg: #f1f5f9;
    --ff-card-bg: #ffffff;
    --ff-text: #1e293b;
    --ff-text-muted: #64748b;
    --ff-border: #e2e8f0;
    --ff-success: #10b981;
    --ff-warning: #f59e0b;
    --ff-danger: #ef4444;
    --ff-info: #3b82f6;
    --ff-radius: 12px;
    --ff-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 1px 2px rgba(0, 0, 0, .06);
    --ff-shadow-lg: 0 10px 30px rgba(0, 0, 0, .12);
    --ff-transition: all .25s cubic-bezier(.4, 0, .2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--ff-bg);
    color: var(--ff-text);
    font-family: 'Tajawal', 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── ANIMATIONS ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }

    100% {
        background-position: 200px 0;
    }
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, .4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

a {
    text-decoration: none;
    color: inherit;
}

/* ── LAYOUT ── */
.ff-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── */
.ff-sidebar {
    width: var(--ff-sidebar-width);
    background: var(--ff-sidebar-bg);
    color: var(--ff-sidebar-text);
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: width .25s ease;
    overflow: hidden;
}

.ff-sidebar-collapsed .ff-sidebar {
    width: var(--ff-sidebar-collapsed);
}

.ff-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    min-height: 56px;
}

.ff-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.ff-logo i {
    font-size: 22px;
    color: var(--ff-primary);
    flex-shrink: 0;
}

.ff-sidebar-toggle {
    background: none;
    border: none;
    color: var(--ff-sidebar-text);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    flex-shrink: 0;
}

.ff-sidebar-toggle:hover {
    color: #fff;
}

/* Nav */
.ff-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
}

.ff-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.ff-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .1);
    border-radius: 4px;
}

.ff-nav-section {
    margin-bottom: 4px;
}

.ff-nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(148, 163, 184, .5);
    padding: 12px 20px 4px;
    white-space: nowrap;
}

.ff-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font-size: 13px;
    color: var(--ff-sidebar-text);
    cursor: pointer;
    transition: var(--ff-transition);
    white-space: nowrap;
    border-inline-start: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.ff-nav-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(99, 102, 241, .1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity .2s;
}

.ff-nav-item:hover::before {
    opacity: 1;
}

.ff-nav-item:hover {
    background: var(--ff-sidebar-hover);
    color: #e2e8f0;
    padding-inline-start: 24px;
}

.ff-nav-item.ff-nav-active {
    background: rgba(99, 102, 241, .15);
    color: var(--ff-sidebar-text-active);
    border-inline-start-color: var(--ff-primary);
}

.ff-nav-item.ff-nav-active::before {
    opacity: 1;
}

.ff-nav-item.ff-nav-active i {
    color: var(--ff-primary-light);
}

.ff-nav-item i {
    width: 20px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ff-sidebar-collapsed .ff-nav-item {
    justify-content: center;
    padding: 10px;
}

.ff-sidebar-collapsed .ff-nav-item span,
.ff-sidebar-collapsed .ff-nav-section-title,
.ff-sidebar-collapsed .ff-logo span {
    display: none;
}

.ff-sidebar-collapsed .ff-nav-item {
    border-inline-start: none;
}

/* ── MAIN ── */
.ff-main {
    flex: 1;
    margin-inline-start: var(--ff-sidebar-width);
    transition: margin .25s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ff-sidebar-collapsed .ff-main {
    margin-inline-start: var(--ff-sidebar-collapsed);
}

/* ── TOPBAR ── */
.ff-topbar {
    height: var(--ff-topbar-height);
    background: var(--ff-card-bg);
    border-bottom: 1px solid var(--ff-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 900;
}

.ff-topbar-title h1 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ff-text);
}

.ff-topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ── CONTENT ── */
.ff-content {
    flex: 1;
    padding: 20px;
}

/* ── PAGE ── */
.ff-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ff-page-header h2 {
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ff-page-header h2 i {
    color: var(--ff-primary);
}

/* ── CARDS ── */
.ff-card {
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    box-shadow: var(--ff-shadow);
    overflow: hidden;
    animation: fadeInUp .4s ease;
    transition: var(--ff-transition);
    border: 1px solid transparent;
}

.ff-card:hover {
    box-shadow: var(--ff-shadow-lg);
}

.ff-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--ff-border);
}

.ff-card-header h4 {
    font-size: 15px;
    font-weight: 600;
}

/* ── STAT CARDS ── */
.ff-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
}

.ff-stat-card {
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--ff-shadow);
    transition: var(--ff-transition);
    animation: fadeInUp .4s ease both;
    cursor: default;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.ff-stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(99, 102, 241, .03));
    pointer-events: none;
}

.ff-stat-card:nth-child(1) {
    animation-delay: .05s;
}

.ff-stat-card:nth-child(2) {
    animation-delay: .1s;
}

.ff-stat-card:nth-child(3) {
    animation-delay: .15s;
}

.ff-stat-card:nth-child(4) {
    animation-delay: .2s;
}

.ff-stat-card:nth-child(5) {
    animation-delay: .25s;
}

.ff-stat-card:nth-child(6) {
    animation-delay: .3s;
}

.ff-stat-card:nth-child(7) {
    animation-delay: .35s;
}

.ff-stat-card:nth-child(8) {
    animation-delay: .4s;
}

.ff-stat-card:nth-child(9) {
    animation-delay: .45s;
}

.ff-stat-card:nth-child(10) {
    animation-delay: .5s;
}

.ff-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
    border-color: var(--ff-border);
}

.ff-stat-card:hover .ff-stat-icon {
    transform: scale(1.1);
}

.ff-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: transform .3s ease;
    flex-shrink: 0;
}

.ff-stat-info {
    display: flex;
    flex-direction: column;
}

.ff-stat-value {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}

.ff-stat-label {
    font-size: 12px;
    color: var(--ff-text-muted);
}

.ff-stat-purple .ff-stat-icon {
    background: #6366f115;
    color: #6366f1;
}

.ff-stat-blue .ff-stat-icon {
    background: #3b82f615;
    color: #3b82f6;
}

.ff-stat-green .ff-stat-icon {
    background: #10b98115;
    color: #10b981;
}

.ff-stat-orange .ff-stat-icon {
    background: #f59e0b15;
    color: #f59e0b;
}

.ff-stat-teal .ff-stat-icon {
    background: #14b8a615;
    color: #14b8a6;
}

.ff-stat-indigo .ff-stat-icon {
    background: #818cf815;
    color: #818cf8;
}

.ff-stat-red .ff-stat-icon {
    background: #ef444415;
    color: #ef4444;
}

.ff-stat-yellow .ff-stat-icon {
    background: #eab30815;
    color: #eab308;
}

.ff-stat-gold .ff-stat-icon {
    background: #d9790615;
    color: #d97906;
}

.ff-stat-gray .ff-stat-icon {
    background: #64748b15;
    color: #64748b;
}

/* ── TABLE ── */
.ff-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ff-table thead th {
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    padding: 12px 14px;
    text-align: start;
    font-weight: 700;
    font-size: 12px;
    color: var(--ff-text-muted);
    border-bottom: 2px solid var(--ff-border);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ff-table tbody td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--ff-border);
    vertical-align: middle;
    transition: background .15s;
}

.ff-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.ff-table-row {
    cursor: pointer;
    transition: var(--ff-transition);
    position: relative;
}

.ff-table-row:hover {
    background: #eef2ff !important;
}

.ff-table-row:hover td {
    color: var(--ff-primary-dark);
}

.ff-table-row:active {
    transform: scale(.995);
}

/* ── DATATABLE ── */
.ff-datatable-toolbar {
    padding: 14px 16px;
    border-bottom: 1px solid var(--ff-border);
    background: linear-gradient(180deg, #fafbfc, #fff);
}

.ff-search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1.5px solid var(--ff-border);
    border-radius: 10px;
    padding: 0 14px;
    max-width: 420px;
    transition: var(--ff-transition);
}

.ff-search-box:focus-within {
    border-color: var(--ff-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
}

.ff-search-box i {
    color: var(--ff-text-muted);
    font-size: 14px;
}

.ff-search-box input {
    border: none;
    background: none;
    padding: 10px 8px;
    font-size: 14px;
    outline: none;
    flex: 1;
    font-family: inherit;
    color: var(--ff-text);
}

.ff-datatable-loading,
.ff-datatable-empty,
.ff-empty-state {
    padding: 60px 40px;
    text-align: center;
    color: var(--ff-text-muted);
    animation: fadeIn .4s ease;
}

.ff-datatable-empty i,
.ff-empty-state i {
    font-size: 52px;
    margin-bottom: 16px;
    display: block;
    opacity: .2;
    animation: float 3s ease-in-out infinite;
}

.ff-datatable-empty p,
.ff-empty-state p {
    font-size: 15px;
    font-weight: 500;
}

.ff-loading {
    padding: 60px;
    text-align: center;
    color: var(--ff-text-muted);
    font-size: 15px;
}

.ff-loading i {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
    color: var(--ff-primary);
}

/* ── PAGINATION ── */
.ff-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    font-size: 13px;
    color: var(--ff-text-muted);
    border-top: 1px solid var(--ff-border);
    background: linear-gradient(180deg, #fff, #fafbfc);
}

/* ── BUTTONS ── */
.ff-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--ff-transition);
    font-family: inherit;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.ff-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity .2s;
}

.ff-btn:hover::after {
    opacity: 1;
}

.ff-btn:active {
    transform: scale(.96);
}

.ff-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
}

.ff-btn-primary {
    background: linear-gradient(135deg, var(--ff-primary), var(--ff-primary-dark));
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, .3);
}

.ff-btn-primary:hover {
    background: linear-gradient(135deg, var(--ff-primary-dark), #4338ca);
    box-shadow: 0 4px 16px rgba(99, 102, 241, .4);
    transform: translateY(-1px);
}

.ff-btn-outline {
    background: var(--ff-card-bg);
    border: 1.5px solid var(--ff-border);
    color: var(--ff-text);
}

.ff-btn-outline:hover {
    background: #f8fafc;
    border-color: var(--ff-primary);
    color: var(--ff-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, .1);
}

.ff-btn-danger {
    background: linear-gradient(135deg, var(--ff-danger), #dc2626);
    color: #fff;
    box-shadow: 0 2px 8px rgba(239, 68, 68, .3);
}

.ff-btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 16px rgba(239, 68, 68, .4);
}

.ff-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none !important;
}

/* ── FORM ── */
.ff-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeIn .3s ease;
}

.ff-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.ff-form-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ff-form-grid label {
    font-size: 12px;
    font-weight: 700;
    color: var(--ff-text-muted);
    text-transform: uppercase;
    letter-spacing: .3px;
}

.ff-input {
    padding: 10px 14px;
    border: 1.5px solid var(--ff-border);
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: var(--ff-transition);
    font-family: inherit;
    background: #fff;
    width: 100%;
    color: var(--ff-text);
}

.ff-input:hover {
    border-color: #cbd5e1;
}

.ff-input:focus {
    border-color: var(--ff-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .1);
    background: #fafafe;
}

.ff-input::placeholder {
    color: #94a3b8;
}

textarea.ff-input {
    resize: vertical;
    min-height: 60px;
}

select.ff-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: left .75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-inline-start: 2.5em;
}

[dir="ltr"] select.ff-input {
    background-position: right .75rem center;
    padding-inline-start: 14px;
    padding-inline-end: 2.5em;
}

.ff-form-actions {
    display: flex;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--ff-border);
    justify-content: flex-start;
}

/* ── MODAL ── */
.ff-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn .2s ease;
}

.ff-modal {
    background: var(--ff-card-bg);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
    animation: slideUp .35s cubic-bezier(.16, 1, .3, 1);
}

.ff-modal-lg {
    max-width: 720px;
}

.ff-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--ff-border);
    background: linear-gradient(180deg, #fafbfc, #fff);
}

.ff-modal-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--ff-text);
}

.ff-modal-close {
    background: #f1f5f9;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--ff-text-muted);
    line-height: 1;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ff-transition);
}

.ff-modal-close:hover {
    color: #fff;
    background: var(--ff-danger);
}

.ff-modal-body {
    padding: 24px;
}

/* ── MODAL SCROLLBAR ── */
.ff-modal::-webkit-scrollbar {
    width: 6px;
}

.ff-modal::-webkit-scrollbar-track {
    background: transparent;
}

.ff-modal::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.ff-modal::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .ff-sidebar {
        width: var(--ff-sidebar-collapsed);
    }

    .ff-sidebar .ff-nav-item span,
    .ff-sidebar .ff-nav-section-title,
    .ff-sidebar .ff-logo span {
        display: none;
    }

    .ff-main {
        margin-inline-start: var(--ff-sidebar-collapsed);
    }

    .ff-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-form-row {
        grid-template-columns: 1fr;
    }

    .ff-content {
        padding: 12px;
    }

    .ff-topbar {
        padding: 0 12px;
    }

    .ff-page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .ff-stats-grid {
        grid-template-columns: 1fr;
    }

    .ff-table {
        font-size: 11px;
    }

    .ff-table thead th,
    .ff-table tbody td {
        padding: 6px 8px;
    }
}

/* ── TRACKING PAGE ── */
.ff-tracking-page {
    min-height: 100%;
}

.ff-tracking-hero {
    background: linear-gradient(135deg, #4f46e5, #6366f1, #818cf8);
    border-radius: var(--ff-radius);
    padding: 48px 24px;
    text-align: center;
    color: #fff;
    margin-bottom: 24px;
}

.ff-tracking-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.9;
}

.ff-tracking-hero h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.ff-tracking-search {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.ff-tracking-input {
    flex: 1;
    padding: 14px 20px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 16px;
    font-family: inherit;
    outline: none;
    backdrop-filter: blur(10px);
}

.ff-tracking-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.ff-tracking-input:focus {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.25);
}

.ff-tracking-btn {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 10px;
    white-space: nowrap;
}

.ff-tracking-result {
    max-width: 800px;
    margin: 0 auto;
}

.ff-tracking-error {
    text-align: center;
    padding: 48px 24px;
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    box-shadow: var(--ff-shadow);
}

.ff-tracking-error i {
    font-size: 48px;
    color: var(--ff-warning);
    margin-bottom: 16px;
}

.ff-tracking-error p {
    font-size: 18px;
    color: var(--ff-text-muted);
    margin-bottom: 20px;
}

.ff-tracking-status-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-radius: var(--ff-radius);
    color: #fff;
    margin-bottom: 20px;
}

.ff-tracking-status-banner i {
    font-size: 36px;
    opacity: 0.9;
}

.ff-tracking-awb {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.ff-tracking-status-text {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 4px;
}

.ff-tracking-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.ff-tracking-info-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    padding: 16px;
    box-shadow: var(--ff-shadow);
}

.ff-tracking-info-card>i {
    font-size: 20px;
    color: var(--ff-primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
}

.ff-tracking-info-card small {
    color: var(--ff-text-muted);
    font-size: 12px;
    display: block;
}

.ff-tracking-info-card strong {
    font-size: 14px;
    display: block;
    margin-top: 2px;
}

.ff-tracking-timeline {
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    padding: 24px;
    box-shadow: var(--ff-shadow);
}

.ff-tracking-timeline h3 {
    font-size: 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ff-text);
}

.ff-timeline {
    position: relative;
    padding-inline-start: 32px;
}

.ff-timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 11px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--ff-border);
}

.ff-timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.ff-timeline-item:last-child {
    padding-bottom: 0;
}

.ff-timeline-dot {
    position: absolute;
    inset-inline-start: -28px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px var(--ff-border);
    z-index: 1;
}

.ff-timeline-first .ff-timeline-dot {
    width: 18px;
    height: 18px;
    inset-inline-start: -30px;
    top: 2px;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.ff-timeline-status {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.ff-timeline-notes {
    font-size: 13px;
    color: var(--ff-text-muted);
}

.ff-timeline-date {
    font-size: 12px;
    color: var(--ff-text-muted);
    margin-top: 4px;
    opacity: 0.7;
}

.ff-tracking-no-logs {
    text-align: center;
    padding: 32px;
    color: var(--ff-text-muted);
    background: var(--ff-card-bg);
    border-radius: var(--ff-radius);
    box-shadow: var(--ff-shadow);
}

@media (max-width: 768px) {
    .ff-tracking-search {
        flex-direction: column;
    }

    .ff-tracking-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ff-tracking-hero {
        padding: 32px 16px;
    }

    .ff-tracking-hero h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .ff-tracking-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Horizontal UI Refresh
   ============================================ */

:root {
    --ff-primary: #0b6bcb;
    --ff-primary-dark: #084f99;
    --ff-primary-light: #5db4ff;
    --ff-accent: #ff8d3f;
    --ff-bg: #eef4fb;
    --ff-card-bg: rgba(255, 255, 255, 0.94);
    --ff-border: rgba(15, 23, 42, 0.08);
    --ff-text: #0f172a;
    --ff-text-muted: #64748b;
    --ff-radius: 18px;
    --ff-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    --ff-shadow-lg: 0 26px 60px rgba(15, 23, 42, 0.16);
}

body {
    background:
        radial-gradient(circle at top left, rgba(11, 107, 203, 0.1), transparent 28%),
        radial-gradient(circle at top right, rgba(255, 141, 63, 0.11), transparent 24%),
        linear-gradient(180deg, #f7fbff 0%, var(--ff-bg) 100%);
    min-height: 100vh;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -120px;
    left: -80px;
    background: rgba(11, 107, 203, 0.18);
}

body::after {
    right: -80px;
    bottom: -120px;
    background: rgba(255, 141, 63, 0.18);
}

.ff-layout {
    display: block;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.ff-shell {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 18px 18px 0;
    backdrop-filter: blur(18px);
}

.ff-topbar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 74px;
    padding: 14px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
}

.ff-topbar-start,
.ff-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ff-topbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ff-mobile-nav-toggle {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(11, 107, 203, 0.12), rgba(11, 107, 203, 0.03));
    color: var(--ff-primary);
    box-shadow: inset 0 0 0 1px rgba(11, 107, 203, 0.12);
    cursor: pointer;
}

.ff-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.ff-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, var(--ff-primary) 0%, #149ddd 100%);
    box-shadow: 0 18px 30px rgba(11, 107, 203, 0.24);
    font-size: 20px;
}

.ff-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ff-brand-copy strong {
    font-size: 17px;
    line-height: 1.1;
}

.ff-brand-copy small {
    color: var(--ff-text-muted);
    font-size: 12px;
    letter-spacing: 0.04em;
}

.ff-current-context {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 0.86));
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.ff-current-context span {
    color: var(--ff-text-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ff-current-context strong {
    font-size: 14px;
    font-weight: 800;
    color: var(--ff-text);
}

.ff-utility-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 141, 63, 0.14), rgba(255, 141, 63, 0.05));
    color: #9a4b12;
    font-size: 13px;
    font-weight: 800;
    border: 1px solid rgba(255, 141, 63, 0.18);
    transition: var(--ff-transition);
}

.ff-utility-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(255, 141, 63, 0.14);
}

.ff-topnav {
    margin-top: 12px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
}

.ff-topnav-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 16px 20px;
    scrollbar-width: thin;
}

.ff-topnav-scroll::-webkit-scrollbar {
    height: 6px;
}

.ff-topnav-scroll::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.24);
    border-radius: 999px;
}

.ff-nav-group {
    min-width: max-content;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-inline-end: 18px;
    border-inline-end: 1px solid rgba(148, 163, 184, 0.16);
}

.ff-nav-group:last-child {
    border-inline-end: none;
    padding-inline-end: 0;
}

.ff-nav-group-title {
    color: var(--ff-text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ff-nav-group-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ff-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    color: var(--ff-text);
    font-size: 13px;
    font-weight: 700;
    transition: var(--ff-transition);
}

.ff-nav-pill i {
    font-size: 13px;
    color: var(--ff-primary);
}

.ff-nav-pill:hover {
    transform: translateY(-2px);
    border-color: rgba(11, 107, 203, 0.18);
    color: var(--ff-primary-dark);
}

.ff-nav-pill.ff-nav-active {
    color: #fff;
    background: linear-gradient(135deg, var(--ff-primary) 0%, #149ddd 100%);
    box-shadow: 0 18px 28px rgba(11, 107, 203, 0.2);
    border-color: transparent;
}

.ff-nav-pill.ff-nav-active i {
    color: #fff;
}

.ff-main {
    margin-inline-start: 0;
    padding: 16px 18px 28px;
}

.ff-hero,
.ff-content,
.ff-app-footer {
    max-width: 1480px;
    margin-inline: auto;
}

.ff-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 30px;
    border-radius: 28px;
    margin-bottom: 22px;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.22), transparent 22%),
        linear-gradient(130deg, #0b6bcb 0%, #0f8bdc 55%, #ff8d3f 120%);
    box-shadow: 0 30px 60px rgba(11, 107, 203, 0.18);
}

.ff-hero::before,
.ff-hero::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.ff-hero::before {
    width: 220px;
    height: 220px;
    top: -120px;
    inset-inline-end: 12%;
}

.ff-hero::after {
    width: 140px;
    height: 140px;
    inset-inline-start: -40px;
    bottom: -60px;
}

.ff-hero-copy,
.ff-hero-actions {
    position: relative;
    z-index: 1;
}

.ff-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 620px;
}

.ff-hero-kicker {
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.ff-hero h1 {
    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.05;
    margin: 0;
}

.ff-hero p {
    margin: 0;
    font-size: 14px;
    opacity: 0.86;
}

.ff-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ff-hero-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    backdrop-filter: blur(14px);
    transition: var(--ff-transition);
}

.ff-hero-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.ff-content {
    padding: 0;
}

.ff-app-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 6px 0;
    color: var(--ff-text-muted);
    font-size: 12px;
    font-weight: 700;
}

.ff-page-header {
    padding: 20px 22px;
    margin-bottom: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
}

.ff-card,
.ff-stat-card,
.ff-modal,
.ff-tracking-card,
.ff-tracking-info-card,
.ff-tracking-timeline,
.ff-tracking-no-logs {
    background: var(--ff-card-bg);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--ff-shadow);
    backdrop-filter: blur(16px);
}

.ff-card:hover,
.ff-stat-card:hover,
.ff-tracking-card:hover {
    box-shadow: var(--ff-shadow-lg);
}

.ff-card-header,
.ff-datatable-toolbar,
.ff-pagination,
.ff-modal-header {
    background: linear-gradient(180deg, rgba(247, 251, 255, 0.96), rgba(255, 255, 255, 0.82));
}

.ff-table thead th {
    background: linear-gradient(180deg, #edf7ff, #f8fbff);
    color: #35506f;
    border-bottom-color: rgba(11, 107, 203, 0.12);
}

.ff-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.7);
}

.ff-table-row:hover {
    background: rgba(93, 180, 255, 0.12) !important;
}

.ff-stat-card {
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 251, 255, 0.9));
}

.ff-stat-card::after {
    background: linear-gradient(135deg, transparent 56%, rgba(11, 107, 203, 0.05));
}

.ff-btn-primary {
    background: linear-gradient(135deg, var(--ff-primary) 0%, #149ddd 100%);
    box-shadow: 0 14px 28px rgba(11, 107, 203, 0.18);
}

.ff-btn-primary:hover {
    background: linear-gradient(135deg, var(--ff-primary-dark) 0%, #0b6bcb 100%);
    box-shadow: 0 18px 30px rgba(11, 107, 203, 0.24);
}

.ff-btn-outline {
    color: var(--ff-text);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.72);
}

.ff-btn-outline:hover {
    color: var(--ff-primary);
    border-color: rgba(11, 107, 203, 0.18);
    background: rgba(255, 255, 255, 0.92);
}

.ff-utility-bell {
    position: relative;
}

.ff-utility-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    box-shadow: 0 10px 18px rgba(239, 68, 68, 0.3);
}

.ff-notification-list {
    display: grid;
    gap: 14px;
}

.ff-notification-card {
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92));
    transition: var(--ff-transition);
}

.ff-notification-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.ff-notification-card.is-unread {
    border-color: rgba(59, 130, 246, 0.22);
    box-shadow: 0 18px 32px rgba(59, 130, 246, 0.08);
}

.ff-notification-head,
.ff-notification-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ff-notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    font-size: 16px;
}

.ff-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 980;
}

.ff-mobile-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1180px) {
    .ff-topbar {
        grid-template-columns: 1fr auto;
    }

    .ff-topbar-center {
        display: none;
    }

    .ff-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 980px) {
    .ff-shell {
        padding: 12px 12px 0;
    }

    .ff-main {
        padding: 14px 12px 22px;
    }

    .ff-mobile-nav-toggle {
        display: inline-flex;
    }

    .ff-topbar {
        grid-template-columns: 1fr auto;
        gap: 12px;
        padding: 12px 14px;
        border-radius: 22px;
    }

    .ff-brand-copy small {
        display: none;
    }

    .ff-topnav {
        position: fixed;
        inset-inline: 12px;
        top: 92px;
        max-height: calc(100vh - 110px);
        overflow: auto;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-18px);
        transition: transform 0.22s ease, opacity 0.22s ease;
        z-index: 990;
    }

    .ff-topnav.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .ff-topnav-scroll {
        flex-direction: column;
        gap: 14px;
        padding: 18px;
    }

    .ff-nav-group {
        min-width: 100%;
        padding-inline-end: 0;
        padding-bottom: 14px;
        border-inline-end: none;
        border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    }

    .ff-nav-group:last-child {
        padding-bottom: 0;
        border-bottom: none;
    }

    .ff-nav-group-links {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .ff-nav-pill {
        width: 100%;
        justify-content: flex-start;
    }

    .ff-hero {
        padding: 24px 20px;
        border-radius: 24px;
    }

    .ff-app-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .ff-notification-head,
    .ff-notification-foot {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .ff-topbar {
        grid-template-columns: 1fr;
    }

    .ff-topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .ff-utility-link span {
        display: none;
    }

    .ff-brand-copy strong {
        font-size: 15px;
    }

    .ff-hero h1 {
        font-size: 28px;
    }
}
