/* Custom Styling for e-Transport cPanel Application */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --gray-800: #1e293b;
    --radius: 8px;
    --shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.25;
    padding-bottom: 2rem;
}

/* Sticky Top Permanent Navigation Bar */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: #ffffff !important;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.6rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dark);
    text-decoration: none;
}

.brand-icon {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.nav-links {
    display: flex;
    gap: 0.6rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-600);
    padding: 0.35rem 0.75rem;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.container {
    max-width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
}

.page-header {
    margin-bottom: 1rem;
}

.page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
}

.page-desc {
    color: var(--gray-600);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.card {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
}

/* Hide native table scrollbar so only the single persistent scrollbar is visible */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.25rem;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.table-responsive::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Persistent Single Sticky Scrollbar Fixed at Viewport Bottom */
.sticky-horizontal-scrollbar {
    position: fixed;
    bottom: 0;
    z-index: 9999;
    overflow-x: scroll;
    background: rgba(255, 255, 255, 0.95);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    height: 14px;
}

.sticky-horizontal-scrollbar::-webkit-scrollbar {
    height: 10px;
}

.sticky-horizontal-scrollbar::-webkit-scrollbar-track {
    background: var(--gray-100);
}

.sticky-horizontal-scrollbar::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

.sticky-scrollbar-content {
    height: 1px;
}

.table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.775rem;
}

.table th {
    background: var(--gray-100);
    font-weight: 700;
    color: var(--gray-800);
    padding: 0.2rem 0.3rem !important;
    font-size: 0.725rem;
    white-space: normal !important;
    vertical-align: bottom;
    text-align: center;
    line-height: 1.1;
    word-break: break-word;
}

.table td {
    padding: 0.15rem 0.35rem !important;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap !important;
    vertical-align: middle;
    line-height: 1.2;
}

.table tr:hover {
    background: var(--gray-50);
}

.prod-name-cell {
    white-space: nowrap !important;
    font-weight: 600;
}

.badge {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 3px;
    white-space: nowrap !important;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

.form-control {
    width: 100%;
    padding: 0.25rem 0.35rem;
    font-size: 0.775rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

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

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-sm {
    padding: 0.15rem 0.4rem;
    font-size: 0.725rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
