* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

/* Header */
.header {
    background: var(--primary);
    color: white;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.header-content {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: background 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.2);
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text);
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo h1 {
    font-size: 1.75rem;
    color: var(--primary);
}

.login-logo p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Grid */
.row {
    display: flex;
    gap: 12px;
}

.col-6 {
    flex: 1;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 20px;
}

.badge-success {
    background: #ecfdf5;
    color: #065f46;
}

.badge-warning {
    background: #fffbeb;
    color: #92400e;
}

/* Settings List */
.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 500;
}

.settings-value {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Pickup Address Card */
.pickup-card {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.pickup-card:hover {
    border-color: var(--primary);
}

.pickup-card.selected {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

.pickup-card .name {
    font-weight: 600;
    margin-bottom: 4px;
}

.pickup-card .address {
    font-size: 0.875rem;
    color: var(--text-light);
}

.pickup-card .city {
    font-size: 0.8rem;
    color: var(--primary);
    margin-top: 4px;
}

/* Loading */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result */
.result-box {
    text-align: center;
    padding: 24px;
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 2rem;
}

.result-icon.success {
    background: #ecfdf5;
    color: var(--success);
}

.result-icon.error {
    background: #fef2f2;
    color: var(--danger);
}

.tracking-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 12px 0;
    word-break: break-all;
}

/* Responsive */
@media (max-width: 480px) {
    .row {
        flex-direction: column;
        gap: 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
}

/* Search Select */
.search-select-wrapper {
    position: relative;
}

.search-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
    display: none;
    box-shadow: var(--shadow-lg);
}

.search-select-dropdown.show {
    display: block;
}

.search-select-item {
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.search-select-item:last-child {
    border-bottom: none;
}

.search-select-item:hover {
    background: var(--bg);
}

.search-select-item.selected {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
}


/* Modal - Centered on all devices */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal.show {
    display: flex !important;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    transform: none !important;
    transition: none !important;
    animation: none !important;
}

.modal-content.compact {
    max-width: 420px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--primary);
    color: white;
    flex-shrink: 0;
    border-radius: var(--radius) var(--radius) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: white;
    padding: 6px 12px;
    line-height: 1;
    border-radius: 6px;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: white;
    -webkit-overflow-scrolling: touch;
}

.modal-body .form-group {
    margin-bottom: 14px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body .form-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.modal-body .form-control {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 10px;
}

.modal-body textarea.form-control {
    min-height: 60px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-footer .btn {
    flex: 1;
    padding: 14px 20px;
    font-size: 1rem;
}

/* Desktop modal */
@media (min-width: 600px) {
    .modal {
        background: rgba(0, 0, 0, 0.5);
        display: none;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .modal.show {
        display: flex;
    }
    
    .modal-content {
        max-width: 480px;
        max-height: 90vh;
        height: auto;
        border-radius: var(--radius);
        box-shadow: var(--shadow-lg);
        background: white;
    }
    
    .modal-header {
        border-radius: var(--radius) var(--radius) 0 0;
    }
    
    .modal-body {
        background: white;
        max-height: 60vh;
    }
    
    .modal-footer {
        border-radius: 0 0 var(--radius) var(--radius);
    }
    
    .modal-footer .btn {
        flex: none;
        min-width: 100px;
    }
}

/* Smart Paste Card */
.card h2.card-title {
    display: flex;
    align-items: center;
    gap: 8px;
}


/* Preview Modal Form */
.preview-field {
    margin-bottom: 12px;
}

.preview-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.preview-field input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: white;
    color: var(--text);
}

.preview-field input:focus {
    outline: none;
    border-color: var(--primary);
}

.preview-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.city-input-wrap {
    position: relative;
}

.city-input-wrap .search-select-dropdown {
    max-height: 180px;
}

.cod-field {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    padding: 12px;
    border-radius: 10px;
    margin-top: 8px;
}

.cod-field label {
    color: #065f46;
}

.cod-field input {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border: 2px solid #10b981;
    background: white;
}

.cod-field input:focus {
    border-color: #059669;
}

/* Input error state */
.input-error {
    border-color: var(--danger) !important;
    background: #fef2f2 !important;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

#city_match_status {
    font-size: 0.7rem;
    font-weight: 400;
    text-transform: none;
    margin-left: 6px;
}


/* Original City Box */
.original-city {
    background: #fef9c3;
    border-radius: 6px;
    padding: 6px 10px;
    margin-top: 6px;
    font-size: 0.75rem;
    color: #854d0e;
    display: none;
}


/* Bottom Navigation - Always visible on mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    z-index: 999;
    border-top: 1px solid var(--border);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 8px;
    min-width: 60px;
}

.bottom-nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.3rem;
    line-height: 1;
}

.nav-label {
    font-size: 0.65rem;
    font-weight: 500;
    margin-top: 2px;
}

/* Body padding for bottom nav */
body {
    padding-bottom: 70px;
}

/* Mobile header - simple centered logo */
.header {
    padding: 10px 16px;
}

.header .nav-links {
    display: none;
}

.header-content {
    justify-content: center;
}

.logo {
    font-size: 1.1rem;
}

/* Mobile form improvements */
@media (max-width: 767px) {
    .container {
        padding: 12px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 10px;
    }
    
    .card-title {
        font-size: 1rem;
        margin-bottom: 12px;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }
    
    .btn {
        padding: 12px 16px;
    }
    
    .pickup-card {
        padding: 12px;
    }
    
    .pickup-card .name {
        font-size: 0.9rem;
    }
    
    .pickup-card .address {
        font-size: 0.8rem;
    }
    
    .pickup-card .city {
        font-size: 0.75rem;
    }
    
    textarea.form-control {
        min-height: 60px;
    }
}

/* Desktop - show top nav, hide bottom nav */
@media (min-width: 768px) {
    .bottom-nav {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .header {
        padding: 16px;
    }
    
    .header .nav-links {
        display: flex;
    }
    
    .header-content {
        justify-content: space-between;
    }
    
    .logo {
        font-size: 1.25rem;
    }
}

/* Search Page Styles - Modern & UX Friendly */
.search-page-container {
    min-height: calc(100vh - 140px);
    padding-bottom: 80px;
}

.search-header {
    position: sticky;
    top: 60px;
    background: var(--bg);
    padding: 16px;
    z-index: 50;
    border-bottom: 1px solid var(--border);
}

.search-input-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 14px 48px 14px 48px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.2s;
    outline: none;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.clear-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.clear-btn:hover {
    background: var(--danger);
    transform: translateY(-50%) scale(1.1);
}

.search-count {
    text-align: center;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.search-results {
    max-width: 600px;
    margin: 0 auto;
    padding: 16px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    color: var(--text-light);
    font-size: 0.875rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.no-results h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
    color: var(--text);
}

.no-results p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* City Cards */
.city-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.city-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.city-card:active {
    transform: translateY(0);
}

.city-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.city-card-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
}

.city-card-name mark {
    background: rgba(79, 70, 229, 0.2);
    color: var(--primary);
    padding: 2px 4px;
    border-radius: 4px;
}

.pickup-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.city-card-info {
    display: flex;
    gap: 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.info-icon {
    font-size: 1rem;
}

.info-text {
    font-weight: 500;
}

/* Modal */
.city-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.city-modal.active {
    opacity: 1;
    pointer-events: all;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.city-modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: sticky;
    top: 16px;
    right: 16px;
    float: right;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text);
    transition: all 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
    transform: rotate(90deg);
}

.modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-light);
}

.modal-section {
    padding: 20px 24px;
}

.modal-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
}

.info-grid {
    display: grid;
    gap: 12px;
}

.info-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.info-card-icon {
    font-size: 2rem;
    line-height: 1;
}

.info-card-content {
    flex: 1;
}

.info-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 4px;
}

.info-card-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.info-card-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 2px;
}

.delivery-grid {
    display: grid;
    gap: 12px;
}

.delivery-card {
    background: var(--bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border);
}

.delivery-type {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
    font-size: 0.875rem;
}

.delivery-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.service-tag {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Desktop Responsive */
@media (min-width: 769px) {
    .search-page-container {
        padding-bottom: 40px;
    }
    
    .search-header {
        top: 60px;
        padding: 24px 16px;
    }
    
    .city-modal {
        align-items: center;
    }
    
    .modal-content {
        border-radius: 20px;
        max-height: 90vh;
        margin: 20px;
    }
    
    .city-modal.active .modal-content {
        transform: scale(1);
    }
    
    .modal-content {
        transform: scale(0.9);
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .info-grid .info-card:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .search-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .city-card {
        padding: 14px;
    }
    
    .city-card-name {
        font-size: 1rem;
    }
    
    .modal-header {
        padding: 20px 16px 12px;
    }
    
    .modal-section {
        padding: 16px;
    }
    
    .modal-title {
        font-size: 1.25rem;
    }
}

/* Shipments Page */
.shipment-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s;
}

.shipment-card.cancelled {
    opacity: 0.6;
    background: #f9fafb;
}

.shipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.tracking-badge {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    background: #eef2ff;
    padding: 6px 12px;
    border-radius: 8px;
}

.cancelled-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--danger);
    background: #fee2e2;
    padding: 4px 8px;
    border-radius: 6px;
}

.shipment-details {
    margin-bottom: 12px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.875rem;
}

.detail-icon {
    font-size: 1rem;
    min-width: 20px;
}

.detail-text {
    color: var(--text);
    word-break: break-word;
}

.loading-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    justify-content: center;
    color: var(--text-light);
}

.spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 1rem;
}

.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--danger);
    font-size: 1rem;
}

/* Compact Modal Styles */
.modal-content.compact {
    max-width: 420px;
}

.compact-input {
    padding: 10px 12px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
}

.preview-field {
    margin-bottom: 12px;
}

.preview-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.preview-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.original-city {
    font-size: 0.75rem;
    color: var(--warning);
    margin-top: 4px;
    padding: 6px 8px;
    background: #fffbeb;
    border-radius: 6px;
    display: none;
}

/* COD Amount Field Highlight */
.cod-field-highlight {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 2px solid #3b82f6;
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.cod-field-highlight label {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1e40af;
    margin-bottom: 8px;
}

.cod-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.currency-symbol {
    padding: 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    background: #dbeafe;
    height: 48px;
    display: flex;
    align-items: center;
    border-right: 2px solid #3b82f6;
}

.cod-input {
    flex: 1;
    border: none !important;
    padding: 12px 16px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #1e40af !important;
    background: white !important;
    border-radius: 0 !important;
}

.cod-input:focus {
    outline: none;
    background: #f8fafc !important;
}

.cod-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.cod-hint {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 6px;
    font-style: italic;
}

.input-error {
    border-color: var(--danger) !important;
    animation: shake 0.3s;
}

.cod-input-wrapper.input-error {
    border-color: var(--danger) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* SweetAlert2 Compact Customization */
.swal2-popup.compact-modal {
    padding: 20px !important;
}

.swal2-html-container {
    font-size: 0.9rem !important;
}

/* Mobile optimizations */
@media (max-width: 600px) {
    .modal-body {
        padding: 12px;
    }
    
    .preview-field {
        margin-bottom: 10px;
    }
    
    .compact-input {
        padding: 12px !important;
        font-size: 16px !important;
    }
}
