/* Import Inter Font - Primary Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* NovaNet Logistics Design System - Based on Node.js Application */
:root {
    /* Background Colors */
    --background: hsl(0, 0%, 100%);           /* Pure white */
    --foreground: hsl(20, 14.3%, 4.1%);      /* Near black with warm tone */
    --muted: hsl(60, 4.8%, 95.9%);           /* Light gray background */
    --muted-foreground: hsl(25, 5.3%, 44.7%); /* Medium gray text */
    
    /* Primary Brand Colors */
    --primary: hsl(207, 90%, 54%);           /* Professional blue (#1E90FF) */
    --primary-foreground: hsl(211, 100%, 99%); /* White text on primary */
    --primary-hover: #357ABD;
    
    /* Semantic Colors */
    --secondary: hsl(60, 4.8%, 95.9%);       /* Light gray */
    --destructive: hsl(0, 84.2%, 60.2%);     /* Error red */
    --border: hsl(20, 5.9%, 90%);            /* Subtle border gray */
    --input: hsl(20, 5.9%, 90%);             /* Input field border */
    
    /* Status Badge Colors */
    --status-inquiry-bg: hsl(210, 20%, 96%);
    --status-inquiry-text: hsl(210, 20%, 30%);
    --status-quotation-bg: hsl(270, 50%, 96%);
    --status-quotation-text: hsl(270, 50%, 30%);
    --status-booking-bg: hsl(25, 95%, 96%);
    --status-booking-text: hsl(25, 95%, 30%);
    --status-customs-bg: hsl(210, 100%, 96%);
    --status-customs-text: hsl(210, 100%, 30%);
    --status-in-transit-bg: hsl(45, 100%, 96%);
    --status-in-transit-text: hsl(45, 100%, 30%);
    --status-delivered-bg: hsl(120, 60%, 96%);
    --status-delivered-text: hsl(120, 60%, 30%);
    
    /* Legacy compatibility colors */
    --primary-color: hsl(207, 90%, 54%);
    --secondary-color: hsl(25, 5.3%, 44.7%);
    --success-color: #28a745;
    --warning-color: #FFA726;
    --danger-color: #DC3545;
    --dark-color: hsl(20, 14.3%, 4.1%);
    --sidebar-bg: hsl(60, 4.8%, 95.9%);
    --sidebar-border: hsl(20, 5.9%, 90%);
    --text-primary: hsl(20, 14.3%, 4.1%);
    --text-secondary: hsl(25, 5.3%, 44.7%);
    --text-muted: hsl(25, 5.3%, 60%);
    --border-light: hsl(20, 5.9%, 90%);
    --hover-bg: hsl(60, 4.8%, 97%);
    
    /* Layout Variables */
    --sidebar-width: 240px;
    --navbar-height: 60px;
    --sidebar-header-height: 80px;
    --sidebar-footer-height: 80px;
    --radius: 0.5rem;                        /* Base radius (8px) */
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --background: hsl(240, 10%, 3.9%);      /* Dark background */
        --foreground: hsl(0, 0%, 98%);          /* Light text */
        --muted: hsl(240, 3.7%, 15.9%);         /* Dark gray background */
        --border: hsl(240, 3.7%, 15.9%);        /* Dark border */
        --text-primary: hsl(0, 0%, 98%);
        --text-secondary: hsl(0, 0%, 80%);
        --text-muted: hsl(0, 0%, 65%);
        --sidebar-bg: hsl(240, 3.7%, 15.9%);
        --sidebar-border: hsl(240, 3.7%, 20%);
    }
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--muted);
    margin: 0;
    color: var(--foreground);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Sidebar */
.modern-sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.brand-text {
    flex: 1;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.2;
}

.sidebar-content {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    /* Dynamic height calculation to ensure footer is always visible */
    height: calc(100vh - var(--sidebar-header-height, 80px) - var(--sidebar-footer-height, 80px));
    min-height: 0; /* Important: allows flex child to shrink */
}

.nav-section {
    margin-bottom: 12px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0 20px 8px;
    letter-spacing: 0.5px;
}

/* Collapsible nav section headers */
.nav-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 20px;
    margin-bottom: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
    user-select: none;
}

.nav-section-header:hover {
    background-color: var(--hover-bg);
}

.nav-section-header .nav-section-title {
    flex: 1;
    margin: 0;
    padding: 0;
}

.nav-section-chevron {
    font-size: 0.75rem;
    transition: all 0.2s ease;
    color: var(--text-muted);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    background: none;
}

.nav-link:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
    text-decoration: none;
}

.nav-link.active {
    background-color: var(--primary-color);
    color: white;
    position: relative;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-hover);
}

.nav-link i {
    width: 18px;
    font-size: 16px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0; /* Prevent footer from shrinking */
    min-height: var(--sidebar-footer-height);
    display: flex;
    align-items: center;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px; /* Add space between username and buttons */
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.logout-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.logout-link:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background-color: #F8F9FA;
    padding: 24px 16px;
    width: calc(100vw - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.page-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Clickable card styles */
.clickable-card {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.clickable-card:hover {
    text-decoration: none;
    color: inherit;
}

.clickable-card .stat-value {
    transition: color 0.2s ease;
}

.clickable-card:hover .stat-value {
    color: var(--primary-color);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stat-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-icon.shipments {
    background-color: #e0f2fe;
    color: #0277bd;
}

.stat-icon.documents {
    background-color: #fce4ec;
    color: #c2185b;
}

.stat-icon.revenue {
    background-color: #e8f5e8;
    color: #388e3c;
}

.stat-icon.rating {
    background-color: #fff3e0;
    color: #f57c00;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.btn-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.btn-primary-modern:hover {
    background-color: var(--primary-hover);
    color: white;
    text-decoration: none;
}

.btn-secondary-modern {
    background-color: white;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary-modern:hover {
    background-color: var(--hover-bg);
    color: var(--text-primary);
    text-decoration: none;
}

/* Cards */
.modern-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header-modern {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title-modern {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-action {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.card-action:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Tables */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background-color: #F8F9FA;
    padding: 16px 24px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.modern-table td {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
}

.modern-table tr:hover {
    background-color: var(--hover-bg);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.status-in-transit {
    background-color: #fef3c7;
    color: #92400e;
}

.status-delivered {
    background-color: #d1fae5;
    color: #065f46;
}

/* Alerts */
.alerts-section {
    margin-bottom: 32px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--warning-color);
    margin-bottom: 12px;
}

.alert-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-top: 2px;
}

.alert-icon.warning {
    background-color: var(--warning-color);
    color: white;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.alert-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* Alert Urgency Variants */
.alert-critical {
    border-left-color: var(--danger-color);
    background: #fef2f2;
}

.alert-critical .alert-icon.critical {
    background-color: var(--danger-color);
    color: white;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background: #fffbeb;
}

.alert-warning .alert-icon.warning {
    background-color: var(--warning-color);
    color: white;
}

.alert-info {
    border-left-color: var(--primary-color);
    background: #f0f9ff;
}

.alert-info .alert-icon.info {
    background-color: var(--primary-color);
    color: white;
}

.alert-action {
    display: flex;
    align-items: center;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .modern-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Login page styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
/* Shipment Form Styles */
.shipment-form-container {
    background: var(--background);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin-bottom: 24px;
}

.shipment-form {
    padding: 0;
}

.form-section {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border-light);
    padding-bottom: 12px;
}

.section-title i {
    color: var(--primary-color);
    font-size: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.form-control {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    background-color: white;
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Fix for form column spacing - ensure proper margins between columns */
.form-section .row .col-md-6:first-child {
    padding-right: 12px;
}

.form-section .row .col-md-6:last-child {
    padding-left: 12px;
}

.form-section .row .col-md-6:only-child {
    padding-left: 15px;
    padding-right: 15px;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Ensure consistent styling for all form inputs */
.form-control,
input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="hidden"],
select,
textarea,
.customer-search-input,
#id_quotationNumber,
#id_origin_address,
#id_destination_address,
#id_service_type,
#id_amount,
#id_currency,
#id_validUntil,
#id_terms,
#id_notes,
#id_status,
#customerSearchInput {
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    padding: 10px 12px !important;
    font-size: 14px !important;
    background-color: white !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    width: 100% !important;
    line-height: 1.5 !important;
    display: block !important;
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus,
.customer-search-input:focus,
#id_quotationNumber:focus,
#id_origin_address:focus,
#id_destination_address:focus,
#id_service_type:focus,
#id_amount:focus,
#id_currency:focus,
#id_validUntil:focus,
#id_terms:focus,
#id_notes:focus,
#id_status:focus,
#customerSearchInput:focus {
    outline: none !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Customer field should be visible */

.invalid-feedback {
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 4px;
}

.form-actions {
    background: white;
    border-radius: 8px;
    padding: 20px 24px;
    border: 1px solid var(--border-light);
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-primary { background-color: var(--primary-color); color: white; }
.badge-secondary { background-color: var(--secondary-color); color: white; }
.badge-success { background-color: var(--success-color); color: white; }
.badge-warning { background-color: var(--warning-color); color: white; }
.badge-danger { background-color: var(--danger-color); color: white; }
.badge-info { background-color: #3b82f6; color: white; }

/* Table styles */
.table {
    width: 100%;
    margin-bottom: 0;
    background-color: transparent;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    vertical-align: middle;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
}

.table thead th {
    border-bottom: 2px solid var(--border-light);
    background-color: var(--hover-bg);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-hover tbody tr:hover {
    background-color: var(--hover-bg);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Input group styles */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group .form-control {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    margin-bottom: 0;
}

.input-group-append {
    margin-left: -1px;
}

.input-group-append .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Enhanced Form validation styles */
.form-control.is-invalid {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(239, 68, 68, 0.25) !important;
}

.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--danger-color);
    font-weight: 500;
}

.invalid-feedback[style*="block"] {
    display: block !important;
}

.form-control.is-invalid ~ .invalid-feedback {
    display: block !important;
}

/* Full Width Wrapper for Management Tables - Respects Sidebar */
.full-width-wrapper {
    width: calc(100vw - var(--sidebar-width)); /* Account for sidebar width only */
    position: relative;
    left: 0;
    margin-left: -16px; /* Offset content padding */
    margin-right: -16px;
    padding: 0 16px;
    box-sizing: border-box;
}

/* For mobile - when sidebar is hidden */
@media (max-width: 768px) {
    .full-width-wrapper {
        width: 100vw;
        margin-left: -50vw;
        margin-right: -50vw;
        left: 50%;
    }
}

/* Management Table Layout - Standardized Pattern */
.management-table-container {
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.management-table-container .card-body {
    padding: 0;
    margin: 0;
}

.management-table-container .table-responsive {
    margin: 0;
    padding: 0;
    border-radius: 0;
    overflow-x: auto;
}

.management-table-container .table {
    width: 100%;
    min-width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.management-table-container .table th {
    background-color: #F8F9FA;
    border-bottom: 2px solid #E9ECEF;
    padding: 12px 16px;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    height: 48px;
}

.management-table-container .table td {
    padding: 8px 16px;
    border-bottom: 1px solid #E9ECEF;
    vertical-align: middle;
    height: 56px;
    font-size: 14px;
    line-height: 1.4;
}

.management-table-container .table tbody tr:hover {
    background-color: #f9fafb;
}


/* Detail page styles */
.detail-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.detail-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.detail-label {
    flex: 0 0 35%;
    font-weight: 600;
    color: #495057;
    margin-right: 1rem;
    text-align: left;
}

.detail-value {
    flex: 1;
    color: #212529;
    word-break: break-word;
}

.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Node.js Theme Improvements */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
}

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

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
}

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

/* Alert Cards (like Node.js design) */
.alert-cards {
    margin-top: 20px;
}

.alert-card {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 4px solid var(--warning-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.alert-card.danger {
    border-left-color: var(--danger-color);
}

.alert-card.warning {
    border-left-color: var(--warning-color);
}

.alert-icon-wrapper {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-top: 2px;
}

.alert-icon-wrapper.danger {
    background-color: var(--danger-color);
    color: white;
}

.alert-icon-wrapper.warning {
    background-color: var(--warning-color);
    color: white;
}

.alert-content h6 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--text-primary);
}

.alert-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Make dashboard more like Node.js */
.dashboard-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* Customer Search Autocomplete Styles */
.customer-search-container {
    position: relative;
}

.customer-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-light);
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.customer-result-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.customer-result-item:hover {
    background-color: #f8f9fa;
}

.customer-result-item:last-child {
    border-bottom: none;
}

.customer-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.customer-details {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Shipment Detail Form - Node.js Style */
.shipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.breadcrumb-link {
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link:hover {
    color: var(--primary-hover);
}

.breadcrumb-separator {
    color: var(--text-muted);
}

.breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.shipment-actions {
    display: flex;
    gap: 12px;
}

.shipment-number-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    background: white;
    padding: 20px 24px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.shipment-number {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.shipment-content {
    max-width: 100%;
    width: 100%;
}

.section-card {
    background: white;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.section-header {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-light);
    background: #FAFBFC;
    flex-wrap: nowrap;
}

.section-icon {
    color: var(--primary-color);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.section-title-group {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start;
    min-width: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0 !important;
    line-height: 1.3;
    width: 100%;
}

.section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 !important;
    font-weight: normal;
    line-height: 1.4;
    width: 100%;
    display: block !important;
}

.section-content {
    padding: 20px 24px;
}

.field-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #F5F6F7;
}

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

.field-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    flex: 0 0 120px;
    text-align: left;
}

.field-value {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
    flex: 1;
    word-break: break-word;
}

/* Invoice Management Layout Improvements */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}

.invoice-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
}

.invoice-filters .form-control,
.invoice-filters .form-select {
    min-width: 160px;
    padding: 8px 12px;
    font-size: 14px;
    flex: 1;
}

.invoice-filters .search-input-wrapper {
    min-width: 240px;
    flex: 2;
}

.invoice-filters .d-flex {
    gap: 8px;
}

/* Container with max-width for large screens */
.main-content .container-fluid {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .shipment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .shipment-number-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .field-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .field-label {
        flex: none;
    }
    
    .field-value {
        text-align: left;
    }
}

/* Tracking Timeline */
.tracking-timeline {
    position: relative;
    padding-left: 40px;
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
    border-left: 2px solid #E9ECEF;
    padding-left: 24px;
    margin-left: 10px;
}

.timeline-item:last-child {
    border-left: none;
    padding-bottom: 0;
}

.timeline-item.completed {
    border-left-color: var(--success-color);
}

.timeline-marker {
    position: absolute;
    left: -11px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
}

.timeline-content {
    padding-top: 0;
}

.timeline-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 8px;
}

.timeline-header strong {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.timeline-date {
    color: var(--text-secondary);
    font-size: 12px;
}

.timeline-details {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.view-updates {
    text-align: center;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid #F5F6F7;
}

.view-updates a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.view-updates a:hover {
    color: var(--primary-hover);
}

/* Add Tracking Form Styles */
.tracking-form-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.tracking-page-title {
    margin-bottom: 32px;
}

.tracking-page-title h1 {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.tracking-form-content {
    max-width: 100%;
}

.form-section-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
}

.form-section-separator {
    margin: 24px 0 16px 0;
    padding-top: 16px;
    border-top: 1px solid #F5F6F7;
}

.form-section-separator h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.tracking-form .form-group {
    margin-bottom: 20px;
}

.tracking-form .form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    display: block;
}

.tracking-form .form-control,
.tracking-form .form-select {
    font-size: 14px;
    padding: 10px 12px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
}

.tracking-form .form-control:focus,
.tracking-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.1);
    outline: none;
}

/* Shipment Information Panel */
.shipment-info {
    margin-top: 20px;
}

.shipment-info h4 {
    color: #4A90E2;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 8px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.info-value .badge {
    font-size: 12px;
    padding: 4px 8px;
}

/* Tracking Timeline Styles */
.tracking-timeline {
    padding: 20px 0;
}

.tracking-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
    position: relative;
}

.tracking-item:last-child {
    margin-bottom: 0;
}

.tracking-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 9px;
    top: 25px;
    bottom: -30px;
    width: 2px;
    background: #e9ecef;
}

.tracking-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    margin-top: 2px;
    z-index: 1;
    background: white;
}

.tracking-content {
    flex: 1;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tracking-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.tracking-status {
    font-size: 12px;
    padding: 4px 8px;
}

.tracking-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #6c757d;
}

.tracking-description {
    font-size: 14px;
    color: #495057;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tracking-eta,
.tracking-next-action {
    margin-bottom: 6px;
}

.tracking-footer {
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #e9ecef;
}

/* Typography System - Based on Node.js Design Specification */

/* Headings */
h1, .text-2xl {
    font-size: 24px;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 16px;
}

h2, .text-xl {
    font-size: 20px;
    font-weight: 600;
    color: var(--foreground);
    margin-bottom: 12px;
}

h3, .text-lg {
    font-size: 18px;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 8px;
}

h4, .text-base {
    font-size: 16px;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 6px;
}

/* Body Text */
.text-sm {
    font-size: 14px;
    font-weight: 400;
}

.text-xs {
    font-size: 12px;
    font-weight: 400;
}

/* Font Weights */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

/* Professional Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid transparent;
}

.status-badge-inquiry {
    background-color: var(--status-inquiry-bg);
    color: var(--status-inquiry-text);
    border-color: hsl(210, 20%, 85%);
}

.status-badge-quotation {
    background-color: var(--status-quotation-bg);
    color: var(--status-quotation-text);
    border-color: hsl(270, 50%, 85%);
}

.status-badge-booking {
    background-color: var(--status-booking-bg);
    color: var(--status-booking-text);
    border-color: hsl(25, 95%, 85%);
}

.status-badge-customs {
    background-color: var(--status-customs-bg);
    color: var(--status-customs-text);
    border-color: hsl(210, 100%, 85%);
}

.status-badge-in-transit {
    background-color: var(--status-in-transit-bg);
    color: var(--status-in-transit-text);
    border-color: hsl(45, 100%, 85%);
}

.status-badge-delivered {
    background-color: var(--status-delivered-bg);
    color: var(--status-delivered-text);
    border-color: hsl(120, 60%, 85%);
}

/* Enhanced Table Styling */
.table-compact td {
    padding: 8px 12px;
    font-size: 14px;
}

.table-compact th {
    padding: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted-foreground);
    background-color: var(--muted);
    border-bottom: 1px solid var(--border);
}

/* Stats Card Icons */
.stats-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

/* Activity Timeline Dots */
.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 8px;
    background-color: var(--primary);
}

/* Form Improvements */
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 6px;
}

.form-control {
    border: 1px solid var(--input);
    border-radius: var(--radius);
    padding: 8px 12px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px hsl(207, 90%, 54%, 0.1);
}

/* Button Enhancements */
.btn {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px hsl(207, 90%, 54%, 0.2);
}

/* Card Improvements */
.content-card, .section-card {
    background-color: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 3px hsl(0, 0%, 0%, 0.1);
    transition: box-shadow 0.2s ease;
}

.content-card:hover, .section-card:hover {
    box-shadow: 0 4px 12px hsl(0, 0%, 0%, 0.1);
}

/* Text Color Utilities */
.text-muted {
    color: var(--muted-foreground);
}

.text-gray-600 {
    color: var(--muted-foreground);
}

.text-gray-500 {
    color: var(--text-muted);
}

/* Search and Filter Enhancements */
.input-group-text {
    background-color: var(--muted);
    border-color: var(--input);
    color: var(--muted-foreground);
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.btn-group .btn {
    font-size: 14px;
}

.badge {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: calc(var(--radius) - 2px);
}

.badge.bg-primary {
    background-color: var(--primary) !important;
    color: var(--primary-foreground);
}

.badge.bg-info {
    background-color: var(--accent-color) !important;
    color: white;
}

/* Gap utility for flexbox */
.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 16px;
}

/* Bootstrap utilities for spacing */
.me-1 {
    margin-right: 4px;
}

.me-2 {
    margin-right: 8px;
}

.mb-4 {
    margin-bottom: 24px;
}

/* Search Results Styling */
.search-highlight {
    background-color: hsl(45, 100%, 90%);
    padding: 1px 2px;
    border-radius: 2px;
}

/* Enhanced table hover effects */
.table-hover tbody tr:hover {
    background-color: var(--hover-bg);
    cursor: pointer;
}

/* Search Input with Clear Button */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding-right: 40px;
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-clear-btn:hover {
    background-color: var(--hover-bg);
    color: var(--foreground);
}

.search-clear-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px hsl(207, 90%, 54%, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .modern-sidebar {
        width: 64px;
    }
    
    .main-content {
        margin-left: 64px;
    }
    
    .sidebar-text {
        display: none;
    }
    
    /* Stack search form on mobile */
    .row .col-md-5,
    .row .col-md-3,
    .row .col-md-4 {
        margin-bottom: 16px;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 .btn {
        width: 100%;
        margin-bottom: 8px;
    }
}

.tracking-form .form-control:read-only {
    background-color: #F8F9FA;
    color: var(--text-secondary);
}

/* Selected Shipment Display */
.selected-shipment {
    margin-bottom: 24px;
}

.shipment-item {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.shipment-item.active {
    background: rgba(74, 144, 226, 0.05);
}

.shipment-number {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.shipment-details {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.shipment-route {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.selected-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Recent Updates */
.recent-updates {
    margin-top: 24px;
}

.recent-updates h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.update-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F5F6F7;
}

.update-item:last-child {
    border-bottom: none;
}

.update-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-top: 2px;
    flex-shrink: 0;
}

.update-content {
    flex: 1;
}

.update-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.update-time {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.update-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.form-actions .btn {
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 6px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-form-content .col-md-4,
    .tracking-form-content .col-md-8 {
        margin-bottom: 24px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Full width shipment details optimization */
.shipment-detail-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.shipment-content .row {
    margin: 0;
    width: 100%;
}

.shipment-content .col-md-6 {
    padding-left: 12px;
    padding-right: 12px;
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
}

/* Ensure consistent column widths */
@media (min-width: 768px) {
    .shipment-content .row {
        display: flex;
        flex-wrap: wrap;
        margin-right: -12px;
        margin-left: -12px;
    }
    
    .shipment-content .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding-right: 12px;
        padding-left: 12px;
    }
}

/* Make tracking section full width */
.shipment-content .row.mt-4 .col-md-12 {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

/* Optimize field layout for full width */
.field-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #F5F6F7;
    min-height: 40px;
}

.field-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
    flex: 0 0 140px;
    text-align: left;
    padding-right: 16px;
}

.field-value {
    font-size: 14px;
    color: var(--text-primary);
    text-align: right;
    flex: 1;
    word-break: break-word;
    min-width: 0;
}

/* Section content padding optimization */
.section-content {
    padding: 24px;
}

/* Remove any max-width constraints */
.main-content,
.page-content {
    max-width: calc(100vw - 240px) !important;
    width: calc(100vw - 240px) !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

/* Quotation form specific styling */
.quotation-form .container-fluid {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
}

/* Ensure Bootstrap container uses full width */
.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
    max-width: none;
}

/* Shipment title section with route */
.shipment-title-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shipment-route {
    font-size: 16px;
    color: #8B949E;
    font-weight: 400;
    margin: 0;
    line-height: 1.4;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .shipment-number-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .shipment-route {
        font-size: 14px;
    }
}

/* Settings Page Styles */
.settings-form {
    max-width: 100%;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-light);
}

.settings-icon {
    color: var(--primary-color);
    font-size: 20px;
}

.settings-section-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.settings-form .form-group {
    margin-bottom: 24px;
}

.settings-form .form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.settings-form .form-control,
.settings-form .form-select {
    font-size: 14px;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    background: white;
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.settings-form .form-control:focus,
.settings-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    outline: none;
}

.form-text {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 4px;
}

/* Shipment Status Configuration */
.shipment-statuses-container h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.status-list {
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    overflow: hidden;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: white;
}

.status-item:last-child {
    border-bottom: none;
}

.status-item:hover {
    background: #FAFBFC;
}

.status-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.btn-remove-status {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-remove-status:hover {
    background: rgba(220, 53, 69, 0.1);
}

.add-status-section {
    margin-bottom: 16px;
}

.btn-add-status {
    background: none;
    border: 2px dashed var(--border-light);
    color: var(--primary-color);
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

.btn-add-status:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 226, 0.05);
}

.add-status-form {
    background: #F8F9FA;
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

.add-status-form .form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.status-note {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.empty-status-message {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Form Actions */
.settings-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.btn-large {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
}

/* Responsive design */
@media (max-width: 768px) {
    .settings-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .settings-form-actions {
        justify-content: stretch;
    }
    
    .btn-large {
        width: 100%;
    }
}

/* Service Suggestions Autocomplete */
.service-suggestions {
    z-index: 9999 !important;
    position: absolute !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-top: none !important;
    border-radius: 0 0 4px 4px !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
}

.suggestion-item {
    cursor: pointer !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #eee !important;
    transition: background-color 0.2s ease !important;
}

.suggestion-item:hover {
    background-color: #f8f9fa !important;
}

.suggestion-item:last-child {
    border-bottom: none !important;
}

/* Fix table overflow for autocomplete */
.table-responsive {
    overflow: visible !important;
}

#lineItemsTable {
    overflow: visible !important;
}

#lineItemsTable td {
    position: relative !important;
    overflow: visible !important;
}
