:root {
    --navy: #002D62;
    --orange: #FF8C00;
    --light-bg: #F4F7F9;
    --white: #FFFFFF;
    --text: #333333;
}

/* Custom Premium Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
    border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--navy);
}

/* Firefox scrollbar compatibility */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    background-color: var(--light-bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: var(--navy);
    padding: 10px;
    color: var(--white);
    text-align: center;
}

header h1 {
    font-size: 1rem;
    letter-spacing: 1px;
}

.accent {
    color: var(--orange);
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.tracking-card {
    background: var(--white);
    width: 100%;
    max-width: 350px;
    padding: 20px 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
}

.tracking-card h2 {
    margin-bottom: 6px;
    color: var(--navy);
    font-size: 1.1rem;
}

.tracking-card p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.3s;
}

.input-group input:focus {
    border-color: var(--orange);
}

.btn-track {
    width: 100%;
    background-color: var(--orange);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-track:hover {
    background-color: #E67E00;
}

.btn-track:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.tracking-result {
    display: none;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #e5edf6;
    border-radius: 10px;
    background: #f8fafc;
    text-align: left;
}

.tracking-result.show {
    display: block;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.track-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 6px;
    background: #e8eef6;
    color: var(--navy);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.track-status.received {
    background: #e8eef6;
}

.track-status.on-route {
    background: #fff4df;
    color: #9a5a00;
}

.track-status.arrived {
    background: #e7f7ee;
    color: #167246;
}

.track-status.delivered {
    background: #e8f2ff;
    color: #1f5fa8;
}

.track-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid #e5edf6;
    font-size: 0.78rem;
}

.track-row span {
    color: #64748b;
}

.track-row strong {
    color: var(--navy);
    text-align: right;
}

.tracking-message {
    min-height: 18px;
    margin-top: 10px;
    color: #e63946 !important;
    font-weight: 700;
}

.support-text {
    margin-top: 20px;
}

.support-text a {
    color: var(--navy);
    text-decoration: none;
    font-weight: bold;
}

footer {
    text-align: center;
    padding: 10px;
    font-size: 0.7rem;
    color: #888;
}

.btn-secondary {
    background: white;
    color: var(--navy);
    border: 1.5px solid var(--navy);
    padding: 14px;
    margin-top: 15px;
    border-radius: 12px;
}

.logs-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.btn-close {
    background: #eee;
    border: none;
    padding: 5px 15px;
    border-radius: 5px;
    cursor: pointer;
}


/* Staff Portal styles */
body.staff-body {
    min-height: 100vh;
    overflow: auto;
}

.staff-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff; /* Ensure it has a solid background */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Adds a nice separation when scrolling */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}
.logout-link {
    color: var(--orange);
    text-decoration: none;
    font-size: 0.9rem;
}

.entry-container {
    padding: 15px;
}

.staff-container {
    max-width: 550px; /* Reduces the width for a tighter look */
    margin: 0 auto;
    min-height: 0;
    padding: clamp(12px, 2vh, 22px) 20px;
    box-sizing: border-box;
}

.entry-card {
    background: white;
    padding: clamp(18px, 2.4vh, 26px) 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 45, 98, 0.08);
    border: 1px solid #e2e8f0;
    margin-top: 0;
}

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-group label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 6px;
}

.photo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.photo-box {
    border: 2px dashed var(--navy);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
}

.photo-box label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.photo-box input[type="file"] {
    display: none; 
}

.photo-box .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.entry-card h3 {
    color: var(--navy);
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--orange);
    background: white;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
    outline: none;
}

.photo-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

.photo-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}

.photo-box:hover {
    border-color: var(--orange);
    background: #fff;
}

.photo-box .icon img {
    width: 30px; /* Adjust based on your icon size */
    margin-bottom: 5px;
}

.photo-box label {
    display: block;
    margin-bottom: 15px;
    color: var(--navy);
}

.upload-options {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

/* .upload-btn, .camera-btn {
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: 0.3s;
} */

.upload-btn { background: var(--navy); color: white; }
.camera-btn { background: var(--orange); color: white; }

/* .upload-btn:hover, .camera-btn:hover {
    background-color: var(--navy);
    color: var(--white);
} */

.upload-btn:hover { background: #001d40; }
.camera-btn:hover { background: #e67e00; }

.camera-btn {
    background-color: var(--orange);
    color: var(--white);
    border-color: var(--orange);
}

.camera-btn:hover {
    background-color: #e67e00;
    border-color: #e67e00;
}

.delete-options {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.delete-btn {
    padding: 8px 12px;
    border: 1px solid #dc3545;
    background-color: #dc3545;
    color: var(--white);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.delete-btn:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.image-preview {
    margin-top: 10px;
    text-align: center;
}

.image-preview img {
    max-height: 150px; /* Limits the height of the captured photo preview */
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    margin-top: 10px;
}
.btn-submit {
    background: var(--orange);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}

.btn-submit:hover {
    background-color: #e67e00;
}

.form-divider {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--navy);
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1.5px solid #dce1e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: var(--orange);
    background-color: #fffdfa;
}

/* Staff Profile Styles */
.staff-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff; /* Ensure it has a solid background */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Adds a nice separation when scrolling */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-logo {
    height: 35px;
    width: auto;
}

.logo-text {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.accent {
    color: var(--orange);
}


.right-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.staff-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right; 
}

.staff-info {
    display: flex;
    flex-direction: column;
}

.staff-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.staff-status {
    font-size: 0.65rem;
    color: #4cd137;
    font-weight: normal;
}

.profile-pic {
    width: 35px;
    height: 35px;
    background: var(--orange);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    border: 2px solid rgba(255,255,255,0.2);
}

.logout-link {
    background: rgba(255,255,255,0.1);
    padding: 5px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 0.75rem;
    transition: 0.3s;
}

.logout-link:hover {
    background: var(--orange);
}

/* Shipment Management Main Container */
.manage-container {
    padding: 20px 15px;
    max-width: 1100px;
    margin: 0 auto;
}

/* Primary Dashboard Card */
.manage-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 45, 98, 0.05);
    overflow: hidden;
    border: 1px solid #edf2f7;
}

/* Header Section */
.card-header {
    padding: 20px 25px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.header-content h2 {
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.header-content p {
    color: #718096;
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Enhanced Bulk Toolbar (Glassmorphism Style) */
.bulk-toolbar {
    background: var(--navy);
    padding: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 8px 20px rgba(0, 45, 98, 0.2);
    animation: slideUp 0.3s ease-out;
}

#selectedCount {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    padding-right: 15px;
}

.bulk-toolbar select {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.bulk-toolbar select option {
    color: #333;
}

.btn-apply {
    background: var(--orange);
    border: none;
    padding: 8px 18px;
    color: white;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.btn-apply:hover {
    background: #e67e00;
    transform: translateY(-1px);
}

/* Professional Search Section */
.search-section {
    padding: 15px 25px;
    background: #fafbfc;
}

#shipmentSearch {
    width: 100%;
    max-width: 350px;
    padding: 12px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: all 0.3s;
}

#shipmentSearch:focus {
    border-color: var(--orange);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
}

/* Container for Search and Filter */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 15px;
    align-items: center;
}

/* Styled Filter Dropdown in Staff Portal */
.filter-wrapper select#statusFilter {
    width: 100%;
    padding: 12px 35px 12px 15px;
    border: 2px solid var(--orange); /* Specific Orange Border from image */
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    background-color: #ffffff; /* White background as requested */
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none; /* Removes default browser arrow */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    /* Custom Chevron Icon */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23002D62'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m19 9-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
}

.filter-wrapper select#statusFilter:focus {
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.15);
}

/* Styling the options inside the dropdown */
.filter-wrapper select#statusFilter option {
    background: white;
    color: var(--navy);
    padding: 10px;
    font-weight: 600;
}

/* Responsive adjustment for mobile */
@media (max-width: 600px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-wrapper select {
        width: 100%;
    }
}

/* Data Table Styling */
.table-wrapper {
    overflow-x: auto;
}

.pro-table {
    width: 100%;
    border-collapse: collapse;
}

.pro-table th {
    background: #f8fafc;
    padding: 12px 20px;
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #f1f5f9;
}

.pro-table td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.85rem;
    color: #334155;
    vertical-align: middle;
}

.pro-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Tracking ID Badges */
.tid-badge {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'SF Mono', monospace;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--navy);
}

/* Status Pills (High Contrast) */
.status-pill {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    display: inline-block;
    text-align: center;
    min-width: 100px;
    letter-spacing: 0.3px;
}

.received { background-color: #DBEAFE; color: #1E40AF; }
.on-route { background-color: #FEF3C7; color: #92400E; }
.arrived  { background-color: #D1FAE5; color: #065F46; }
.delivered { background-color: #F3F4F6; color: #374151; }
.paid { background-color: #D1FAE5; color: #065F46; }
.unpaid { background-color: #FEE2E2; color: #991B1B; }

/* Security Code & Interaction */
.code-blur {
    color: #94a3b8;
    font-size: 1.1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: color 0.2s;
}

.code-blur:hover {
    color: var(--navy);
}

.row-check {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--navy);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.log-time {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    display: block;
}

/* Individual Status Select styling */
.single-status-select {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    border: none;
    cursor: pointer;
    outline: none;
    text-transform: uppercase;
}

/* Match the pill colors from earlier */
.single-status-select.received { background-color: #DBEAFE; color: #1E40AF; }
.single-status-select.on-route { background-color: #FEF3C7; color: #92400E; }
.single-status-select.arrived  { background-color: #D1FAE5; color: #065F46; }
.single-status-select.delivered { background-color: #F3F4F6; color: #374151; }

.code-display {
    font-family: 'SF Mono', monospace;
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #94a3b8;
    transition: 0.3s;
}

.code-display.revealed {
    color: var(--navy);
    background: #e2e8f0;
}

/* Premium Success View */
#successView {
    height: 100%;
    padding: clamp(12px, 2vh, 22px) 20px;
    box-sizing: border-box;
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

.success-card {
    background: #ffffff;
    max-width: 410px;
    margin: 0 auto;
    border-radius: 18px;
    padding: clamp(16px, 2.2vh, 24px);
    text-align: center;
    box-shadow: 0 18px 36px rgba(0,0,0,0.08);
    border-top: 5px solid var(--orange);
}

.success-icon {
    font-size: 2.3rem;
    color: #4cd137;
    margin-bottom: 8px;
}

.success-card h2 {
    color: var(--navy);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 18px;
}

/* Premium Success Animation */
#successView {
    animation: premiumPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes premiumPop {
    0% { 
        opacity: 0; 
        transform: scale(0.8) translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1) translateY(0); 
    }
}

.tracking-display h1 {
    font-size: 2rem !important;
    letter-spacing: 2px;
}

/* The Digital Receipt Look */
.tracking-display {
    background: #F8FAFC;
    border: 2px dashed #E2E8F0;
    padding: 18px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    position: relative;
}

.tracking-display p {
    font-size: 0.68rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.tracking-display h1 {
    font-family: 'SF Mono', 'Courier New', monospace;
    color: var(--navy);
    font-size: 2rem;
    margin: 0;
}

.summary-box {
    text-align: left;
    background: #FFFBF0;
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.summary-box p {
    font-size: 0.82rem;
    color: #444;
    margin-bottom: 5px;
}

.summary-box strong {
    color: var(--navy);
}

#successView .btn-lux-secondary,
#successView .btn-lux-primary {
    min-height: 42px;
    padding: 11px 16px !important;
    border-radius: 9px;
    font-size: 0.78rem;
}

#successView #copyFeedback {
    margin-bottom: 10px !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.modal-card {
    background: white;
    width: 90%; max-width: 500px;
    border-radius: 20px; padding: 25px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.header-main h3 {
    font-size: 1.2rem;
    color: var(--navy);
    font-weight: 800;
}

.modal-photos {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 15px; margin-top: 20px;
}

.modal-photos img {
    width: 100%; height: 120px;
    object-fit: cover; border-radius: 10px;
    border: 1px solid #ddd;
}

.btn-close-modal {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
}

/* Premium Image Preview Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 45, 98, 0.4); /* Navy Tinted Overlay */
    backdrop-filter: blur(12px); /* Premium Blur Effect */
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
    padding: 20px;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 600px; /* Wider for better photo view */
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: modalScaleUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalScaleUp {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Close Button Styling */
.btn-close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: #64748b;
    transition: 0.2s;
}

.btn-close-modal:hover {
    background: #e2e8f0;
    color: var(--navy);
    transform: rotate(90deg);
}

/* Image Grid Styling */
.modal-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
}

.modal-photos img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #f1f5f9;
}

/* Shipment Details Layout */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px; /* Reduced gap slightly for 4 items */
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    border: 1px solid #e2e8f0;
}

.section-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    font-weight: 800;
    margin-bottom: 10px;
}

.highlight-text {
    font-family: 'SF Mono', monospace;
    font-size: 1.1rem; /* Slightly smaller to fit grid comfortably */
    font-weight: 800;
    color: var(--navy);
}

.sec-color {
    color: #e63946; /* High alert color for security code */
}

/* Contact Section Styling */
.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.contact-card {
    padding: 15px;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    background: #ffffff;
}

.sub-text {
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 4px;
}

/* Enhanced Photo Displays */
.photo-wrapper {
    text-align: center;
    background: #f8fafc;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.photo-wrapper span {
    font-size: 0.65rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    margin-top: 8px;
    display: block;
}

.modal-photos img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.modal-photos img:hover {
    transform: scale(1.02);
}

/* Global Dashboard Header */
.global-header {
    background: var(--navy);
    padding: 0.5rem 0;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1100px;
    height: 60px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-group h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 2px;
}

.brand-group p {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

/* Nav Button Styling */


/* Enhanced Search Area */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    font-size: 0.9rem;
    color: #94a3b8;
}

#shipmentSearch {
    padding-left: 45px !important; /* Make room for the icon */
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

/* Professional Table Rows */
.pro-table tbody tr {
    transition: all 0.2s ease;
    cursor: pointer;
}

.pro-table tbody tr:hover {
    background-color: #f1f5f9;
    transform: scale(1.002);
}

/* Clickable Badge Style */
.tid-badge {
    transition: all 0.2s;
    display: inline-block;
}

.tid-badge:hover {
    background: var(--navy);
    color: white;
    border-color: var(--navy);
}

@media (max-width: 768px) {
    .manage-container {
        padding: 10px;
    }
    
    .global-header {
        padding: 15px;
    }
    
    .brand-group h2 {
        font-size: 1.1rem;
    }
    
    .nav-link-btn {
        padding: 8px 12px;
        font-size: 0.75rem;
    }
    
    /* Hide non-essential columns on mobile to save space */
    .pro-table th:nth-child(3), 
    .pro-table td:nth-child(3) {
        display: none;
    }
}



/* Preview Content Layout */
.preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.preview-content img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #edf2f7;
}

/* Action Buttons within Modal */
.preview-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

.btn-lux-download {
    flex: 2;
    background: var(--orange);
    color: white !important;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(255, 140, 0, 0.2);
}

.btn-lux-close {
    flex: 1;
    background: #64748b;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
}

#fullViewImage {
    max-width: 90%;
    max-height: 65vh;   /* Reduced from 70vh to ensure space for buttons and padding */
    object-fit: contain; /* Prevents stretching */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.accent {
    color: var(--orange); /* Matches your main theme color */
}

.login-card {
    border-top: 5px solid var(--orange); /* Adds a branded stripe at the top */
}

/* User Profile Dropdown Styling */
.user-menu-container {
    position: relative;
    display: inline-block;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50px;
    transition: 0.3s;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.avatar-circle {
    width: 32px;
    height: 32px;
    background: #64748b; /* Greyish tone from image */
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-label {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.dropdown-chevron {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

/* The actual hidden menu */
.logout-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    min-width: 150px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid #edf2f7;
}

.logout-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #e63946;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    transition: 0.2s;
}

.logout-dropdown a:hover {
    background: #fff5f5;
}

/* Class to show the menu via JS */
.show-menu {
    display: block !important;
    animation: slideUpSubtle 0.2s ease;
}

@keyframes slideUpSubtle {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Staff Portal Responsive Layout */
@media (max-width: 1024px) {
    .global-header .header-container {
        max-width: 100% !important;
        padding: 0 18px !important;
    }

    .manage-container {
        max-width: 100%;
        padding: 16px;
    }

    .pro-table {
        min-width: 820px;
    }

    .staff-container {
        width: min(100%, 550px);
    }
}

@media (max-width: 768px) {
    body.staff-body {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .global-header {
        padding: 10px 0 !important;
    }

    .global-header .header-container {
        height: auto !important;
        min-height: 58px;
        align-items: flex-start !important;
        flex-wrap: wrap;
        gap: 12px;
        padding: 0 16px !important;
    }

    .brand-group h1 {
        font-size: 0.72rem !important;
    }

    .brand-group h2 {
        font-size: 1rem !important;
    }

    .brand-group p {
        font-size: 0.65rem !important;
        line-height: 1.35;
    }

    .nav-actions,
    .global-header .header-container > div:last-child {
        gap: 10px !important;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .nav-link-btn {
        padding: 8px 12px !important;
        font-size: 0.72rem !important;
    }

    .staff-container {
        max-width: 100%;
        width: 100%;
        padding: 14px;
    }

    #registrationView {
        height: auto !important;
        min-height: 0 !important;
        align-items: flex-start !important;
    }

    .entry-card {
        padding: 18px;
        border-radius: 14px;
    }

    #successView {
        height: auto;
        min-height: calc(100vh - 82px);
        overflow: visible;
        padding: 14px;
    }

    .success-card {
        max-width: 100%;
        padding: 18px;
        border-radius: 16px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 18px;
    }

    .bulk-toolbar {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
        padding: 12px;
        gap: 10px;
    }

    #selectedCount {
        width: 100%;
        border-right: 0;
        padding-right: 0;
    }

    .search-section {
        padding: 14px 18px;
    }

    .controls-grid {
        grid-template-columns: 1fr;
    }

    #shipmentSearch {
        max-width: none;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .pro-table {
        min-width: 760px;
    }

    .pro-table th,
    .pro-table td {
        padding: 12px 14px;
    }

    .modal-card {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100vh - 40px);
        overflow: auto;
        padding: 22px !important;
        border-radius: 18px !important;
    }

    .modal-photos {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .phone-grid,
    .photo-section,
    .action-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .photo-section {
        margin: 14px 0 !important;
    }

    .upload-container {
        min-height: 156px;
        padding: 18px 12px !important;
    }

    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .btn-lux-upload,
    #registrationView .btn-lux-secondary,
    #registrationView .btn-lux-primary {
        width: 100%;
        min-height: 40px;
        justify-content: center;
    }

    .entry-card h3 {
        font-size: 1.15rem !important;
    }

    .form-group input {
        padding: 11px 12px;
    }

    .success-card h2 {
        font-size: 1.35rem;
    }

    .tracking-display h1 {
        font-size: 1.55rem !important;
        word-break: break-word;
    }

    .summary-box {
        padding: 12px;
    }

    .confirm-actions {
        flex-direction: column;
    }

    .confirm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .staff-container {
        padding: 10px;
    }

    .entry-card {
        padding: 15px;
    }

    .global-header .header-container {
        padding: 0 12px !important;
    }

    .user-label {
        display: none;
    }

    .nav-link-btn {
        padding: 7px 10px !important;
        font-size: 0.68rem !important;
    }

    .upload-container p {
        font-size: 0.78rem !important;
    }

    .btn-lux-primary,
    .btn-lux-secondary {
        font-size: 0.75rem !important;
        letter-spacing: 0.04em;
    }

    .manage-container {
        padding: 10px 8px;
    }

    .manage-card {
        border-radius: 12px;
    }

    .card-header,
    .search-section {
        padding: 14px;
    }

    .bulk-toolbar select,
    .btn-apply {
        width: 100%;
    }

    .filter-wrapper select#statusFilter {
        padding: 10px 30px 10px 12px;
        font-size: 0.75rem;
    }

    .pro-table {
        min-width: 680px;
    }

    .preview-modal {
        width: calc(100vw - 24px) !important;
        padding: 14px !important;
    }

    .preview-footer {
        flex-direction: column;
        gap: 10px;
    }

    .preview-footer .btn-light,
    .preview-footer .btn-primary {
        width: 100%;
        text-align: center;
    }
}

@media (max-height: 720px) and (min-width: 769px) {
    .staff-container {
        padding: 10px 20px;
    }

    .entry-card {
        padding: 16px 26px;
    }

    #registrationView .entry-card h3 {
        margin-bottom: 10px;
    }

    .photo-section {
        margin: 12px 0 !important;
    }

    .upload-container {
        padding: 14px 12px !important;
    }

    .cloud-icon {
        font-size: 1.5rem !important;
        margin-bottom: 4px !important;
    }

    .upload-container span {
        margin-bottom: 10px !important;
    }

    .action-row {
        margin-top: 10px !important;
    }

    #successView {
        padding: 10px 20px;
    }

    .success-card {
        padding: 14px 20px;
    }

    .tracking-display {
        padding: 14px;
        margin-bottom: 12px;
    }

    .summary-box {
        padding: 12px 14px;
        margin-bottom: 12px;
    }
}

/* Admin Portal Responsive Layout */
@media (max-width: 1200px) {
    .dashboard-main-layout,
    .admin-page-wrapper,
    .admin-container,
    body > .manage-container {
        width: 100%;
        box-sizing: border-box;
    }

    .dashboard-main-layout {
        gap: 28px !important;
    }

    .admin-page-wrapper {
        padding: 30px 18px !important;
    }
}

@media (max-width: 1024px) {
    .dashboard-main-layout {
        grid-template-columns: 240px 1fr !important;
        gap: 22px !important;
        padding-top: 28px !important;
    }

    .action-horizontal-grid {
        gap: 18px !important;
    }

    .action-card {
        padding: 24px !important;
    }

    .premium-signup-container {
        padding: 32px !important;
    }

    .logistics-controls {
        margin-bottom: 28px !important;
    }

    .master-table-card .pro-table,
    .table-wrapper .pro-table {
        min-width: 760px;
    }
}

@media (max-width: 768px) {
    body .global-header {
        height: auto !important;
        min-height: 62px;
        padding: 10px 0 !important;
    }

    body .global-header .header-container {
        height: auto !important;
        min-height: 52px;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        gap: 12px;
        padding: 0 16px !important;
    }

    body .global-header .brand-group h1 {
        font-size: 0.65rem !important;
    }

    body .global-header .brand-group h2 {
        font-size: 0.95rem !important;
    }

    body .global-header .nav-link-btn {
        padding: 8px 12px !important;
        font-size: 0.72rem !important;
        white-space: nowrap;
    }

    /* Hide bulky description labels and descriptions next to avatar on mobile */
    body .global-header .user-label,
    body .global-header .header-container > div:last-child > div:first-child {
        display: none !important;
    }

    body .global-header .header-container > div:last-child {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
    }

    .dashboard-main-layout {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        padding-top: 18px !important;
    }

    .stats-vertical-column {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .stat-card h2 {
        font-size: 1.5rem !important;
    }

    .action-horizontal-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .action-card {
        padding: 20px !important;
    }

    .admin-container {
        max-width: 100% !important;
        padding: 16px !important;
    }

    .premium-signup-container {
        padding: 24px !important;
        border-radius: 16px !important;
    }

    .premium-signup-container h2 {
        font-size: 1.35rem !important;
    }

    .form-section-divider {
        margin: 22px 0 14px !important;
        gap: 10px !important;
    }

    .field-container input,
    .field-container select,
    .station-select {
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        font-size: 0.88rem !important;
    }

    .security-box {
        padding: 16px !important;
        margin-top: 18px !important;
    }

    .btn-create,
    .btn-cancel,
    .login-card .btn-submit {
        min-height: 42px;
        padding: 11px 14px !important;
        font-size: 0.85rem !important;
    }

    .login-container {
        min-height: 100vh;
        padding: 18px;
    }

    .login-card {
        max-width: 380px !important;
        padding: 2rem !important;
    }

    .admin-page-wrapper {
        padding: 18px 14px !important;
    }

    .logistics-controls {
        flex-direction: column;
        align-items: stretch !important;
        padding: 18px !important;
        border-radius: 14px !important;
        margin-bottom: 18px !important;
    }

    .search-wrapper {
        max-width: none !important;
    }

    .filter-wrapper,
    .filter-wrapper select {
        width: 100% !important;
    }

    .master-table-card {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .master-table-card .pro-table {
        table-layout: auto !important;
        min-width: 720px !important;
    }

    .master-table-card .pro-table th,
    .master-table-card .pro-table td {
        padding: 14px !important;
        white-space: nowrap;
    }

    body > .manage-container {
        max-width: 100% !important;
        margin: 18px auto !important;
        padding: 0 14px !important;
    }

    body > .manage-container .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    body > .manage-container .card-header .nav-link-btn {
        width: 100%;
        justify-content: center;
    }

    .modal-overlay .modal-card {
        width: calc(100vw - 28px) !important;
        max-width: calc(100vw - 28px) !important;
        max-height: calc(100vh - 40px);
        overflow: auto !important;
    }

    #detailsModal .info-grid,
    #detailsModal .contact-section,
    #detailsModal .modal-photos {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 600px) {
    .stats-vertical-column {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }

    .stat-card h4 {
        font-size: 0.68rem !important;
    }

    .action-card h3 {
        font-size: 1rem !important;
    }

    .action-card p {
        font-size: 0.8rem !important;
    }

    .premium-signup-container {
        padding: 20px !important;
    }

    .form-section-divider {
        align-items: flex-start !important;
    }

    .section-icon {
        width: 28px !important;
        height: 28px !important;
        flex: 0 0 28px;
    }

    .section-label {
        font-size: 0.75rem !important;
    }

    .divider-line {
        display: none;
    }

    .error-box,
    .success-box,
    .msg {
        align-items: flex-start !important;
        text-align: left !important;
        font-size: 0.78rem !important;
    }

    .login-card {
        padding: 1.5rem !important;
    }

    .login-card h2 {
        font-size: 1.25rem !important;
    }

    .logistics-controls {
        padding: 14px !important;
    }

    .search-wrapper input {
        padding: 12px 14px 12px 42px !important;
        font-size: 0.85rem !important;
    }

    .search-wrapper::before {
        left: 14px !important;
    }

    .master-table-card .pro-table {
        min-width: 660px !important;
    }

    .status-pill {
        min-width: 86px !important;
        width: auto !important;
        font-size: 0.65rem !important;
    }

    .modal-overlay .modal-card {
        padding: 18px !important;
        border-radius: 16px !important;
    }
}

@media (max-width: 480px) {
    body .global-header .header-container {
        padding: 0 10px !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 6px !important;
    }

    body .global-header .brand-group h2 {
        font-size: 0.85rem !important;
    }

    body .global-header .nav-link-btn {
        width: auto !important;
        justify-content: center;
        text-align: center;
        padding: 6px 10px !important;
        font-size: 0.65rem !important;
    }

    body .global-header .logo-text {
        font-size: 0.95rem !important;
    }

    body .global-header .logo-accent {
        display: none !important;
    }

    body .global-header .logo-box {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.95rem !important;
    }

    .manage-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .dashboard-main-layout {
        padding-top: 12px !important;
    }

    .stat-card {
        padding: 14px !important;
    }

    .action-card {
        padding: 18px 16px !important;
    }

    .admin-container {
        padding: 12px !important;
    }

    .premium-signup-container {
        padding: 16px !important;
        border-radius: 14px !important;
    }

    .field-container i {
        left: 12px !important;
    }

    .field-container input,
    .field-container select {
        padding-left: 38px !important;
    }

    .security-box {
        padding: 14px !important;
    }

    .btn-create,
    .btn-cancel {
        width: 100%;
    }

    .admin-page-wrapper {
        padding: 12px 10px !important;
    }

    .master-table-card .pro-table {
        min-width: 600px !important;
    }

    .master-table-card .pro-table th,
    .master-table-card .pro-table td {
        padding: 12px !important;
        font-size: 0.78rem !important;
    }

    .tid-badge {
        padding: 5px 8px !important;
        font-size: 0.72rem !important;
    }

    .preview-modal {
        width: calc(100vw - 20px) !important;
        padding: 14px !important;
    }
}

/* Delivery Station Select Styling */
#destinationStation {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="%23002D62"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" /></svg>') no-repeat right 12px center;
    background-size: 20px;
    padding-right: 40px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

#destinationStation:hover {
    border-color: var(--orange);
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 45, 98, 0.05);
}

#destinationStation:focus {
    border-color: var(--orange);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(255, 140, 0, 0.1);
    outline: none;
}

#destinationStation option {
    padding: 12px;
    background: white;
    color: var(--text);
    font-weight: 500;
}

#destinationStation option:checked {
    background: linear-gradient(var(--orange), var(--orange));
    background-color: var(--orange);
    color: white;
}

@media (max-height: 720px) and (min-width: 769px) {
    .dashboard-main-layout {
        padding-top: 18px !important;
    }

    .stat-card {
        padding: 16px !important;
    }

    .action-card {
        padding: 22px !important;
    }

    .admin-container {
        padding-top: 12px !important;
    }

    .premium-signup-container {
        padding: 24px 32px !important;
    }

    .form-section-divider {
        margin: 20px 0 14px !important;
    }

    .input-wrapper {
        margin-bottom: 12px !important;
    }

    .security-box {
        margin-top: 16px !important;
        padding: 14px !important;
    }

    .btn-create {
        margin-top: 16px !important;
    }

    .admin-page-wrapper {
        padding-top: 22px !important;
        padding-bottom: 22px !important;
    }

    .logistics-controls {
        padding: 18px !important;
        margin-bottom: 22px !important;
    }
}

/* Password Visibility Toggle Styles */
.password-container {
    position: relative;
    width: 100%;
}
.password-container input {
    padding-right: 45px !important;
}
.password-toggle-icon {
    position: absolute !important;
    right: 16px !important;
    left: auto !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    cursor: pointer;
    color: #94a3b8 !important;
    font-size: 1.15rem !important;
    transition: color 0.2s ease, transform 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
}
.password-toggle-icon:hover {
    color: var(--orange) !important;
    transform: translateY(-50%) scale(1.1) !important;
}

/* Responsive Table and Container Rules */
.table-responsive-box {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.transactions-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.revenue-page-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}
