.awpcargo-frontend-dashboard {
    --sidebar-width: 250px;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #3498db;
    --header-height: 60px;
    --transition-speed: 0.3s;
}

.awpcargo-frontend-dashboard * {
    box-sizing: border-box;
}

.awpcargo-frontend-dashboard body {
    display: flex;
    min-height: 100dvh;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.awpcargo-frontend-dashboard .sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    transition: all var(--transition-speed) ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    flex-shrink: 0;
}

.sidebar-header h3 {
    white-space: nowrap;
    font-size: 1.5rem;
}

.close-menu {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
}

.sidebar-menu {
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar-menu::-webkit-scrollbar {
    display: none;
}

.sidebar-menu li {
    list-style: none;
    padding: 0;
    display: flex;
    align-items: stretch;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.sidebar-menu li a,
.sidebar-menu li span.menu-item-content {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    width: 100%;
    text-decoration: none;
    color: inherit;
    white-space: nowrap;
}

.sidebar-menu li:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-menu li:hover a,
.sidebar-menu li:hover span.menu-item-content,
.sidebar-menu li:hover a i,
.sidebar-menu li:hover a span,
.sidebar-menu li:hover span.menu-item-content i,
.sidebar-menu li:hover span.menu-item-content span {
    color: #ffffff !important;
}

.sidebar-menu li.active {
    background: var(--sidebar-active);
    color: white;
}

.sidebar-menu li.active a,
.sidebar-menu li.active span.menu-item-content,
.sidebar-menu li.active a i,
.sidebar-menu li.active a span,
.sidebar-menu li.active span.menu-item-content i,
.sidebar-menu li.active span.menu-item-content span {
    color: white !important;
}

.sidebar-menu li.active:hover {
    background: var(--sidebar-active);
}

.sidebar-menu li i {
    margin-right: 12px;
    font-size: 1.2rem;
    min-width: 25px;
    text-align: center;
}

.sidebar-menu li span {
    white-space: nowrap;
}

.logout-btn {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logout-btn i {
    margin-right: 12px;
    font-size: 1.2rem;
    min-width: 25px;
    text-align: center;
}

.logout-btn span {
    white-space: nowrap;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

header.main-header {
    height: var(--header-height);
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    justify-content: space-between;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 900;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #333;
}

.header-title h2 {
    font-size: 18px;
    color: #333;
}

.content {
    padding: 25px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Notification styles */
.notice {
    padding: 10px 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    margin-bottom: 15px;
}

.notice.notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.notice.notice-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.notice p,
.notice li {
    font-size: 0.85rem;
}

/* Table Container */
.awpcargo-frontend-dashboard .table-min-width {
    min-width: 600px;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Table Header */
.awpcargo-frontend-dashboard .table-min-width thead {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b5563;
}

.awpcargo-frontend-dashboard .table-min-width thead th {
    padding: 16px 24px;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
}

/* Table Body */
.awpcargo-frontend-dashboard .table-min-width tbody tr {
    transition: background 0.2s ease, transform 0.1s ease;
}

.awpcargo-frontend-dashboard .table-min-width tbody tr:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.awpcargo-frontend-dashboard .table-min-width tbody tr td {
    padding: 16px 24px;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* Status Badge */
.awpcargo-frontend-dashboard .table-min-width tbody td span.inline-flex[class*="text-xs"] {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.awpcargo-frontend-dashboard .table-min-width tbody td span.inline-flex:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Copy Button */
.awpcargo-frontend-dashboard .copy-button {
    background: none;
    border: none;
    padding: 4px 8px;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2c3e50;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease;
}

.awpcargo-frontend-dashboard .copy-button:hover {
    background: #e5e7eb;
    color: #1e40af;
}

.awpcargo-frontend-dashboard .copy-button i {
    font-size: 12px;
    opacity: 0.8;
}

.awpcargo-frontend-dashboard .copy-feedback {
    background-color: #10b981;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.awpcargo-frontend-dashboard .copy-feedback.visible {
    opacity: 1;
    visibility: visible;
}

/* Action Buttons */
.awpcargo-frontend-dashboard .action-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.awpcargo-frontend-dashboard .action-buttons a {
    background: none;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.awpcargo-frontend-dashboard .action-buttons a:hover {
    transform: none;
}

.awpcargo-frontend-dashboard .action-buttons a.text-indigo-600 {
    color: #4f46e5;
}

.awpcargo-frontend-dashboard .action-buttons a.text-indigo-600:hover {
    color: #4338ca;
}

.awpcargo-frontend-dashboard .action-buttons a.text-red-600 {
    color: #dc2626;
}

.awpcargo-frontend-dashboard .action-buttons a.text-red-600:hover {
    color: #b91c1c;
}

.awpcargo-frontend-dashboard .action-buttons a::before {
    display: none;
}

/* Pagination */
.awpcargo-frontend-dashboard .pagination {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
}

.awpcargo-frontend-dashboard .pagination .page-numbers {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    transition: none;
}

.awpcargo-frontend-dashboard .pagination .page-numbers.current {
    background: #4361ee;
    color: #ffffff;
}

/* Pagination Info Text (e.g., "Showing 1 to 10 of 38 shipments") */
.awpcargo-frontend-dashboard .pagination span.text-sm.text-gray-500.w-full.text-center {
    display: block;
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    width: 100%;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Keep submit button styles separate */
.awpcargo-frontend-dashboard button[type="submit"] {
    background-color: #2c3e50 !important;
    color: white;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 120px;
    margin-top: 15px;
}

.align-top {
    vertical-align: top;
}

.form-field, .textarea-field {
    border-color: #d1d5db;
}

.form-field {
    height: 48px;
}

.textarea-field {
    min-height: 100px;
    resize: vertical;
}

/* Checkbox Styles */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 3px;
    border: 2px solid #d1d5db;
    cursor: pointer;
    margin: 0;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    transition: all 0.2s ease;
    padding: 0;
    box-sizing: border-box;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

input[type="checkbox"]:checked {
    background-color: #2c3e50;
    border-color: #2c3e50;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 45%;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 22px;
}

.checkbox-container label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    display: flex;
    align-items: center;
    margin: 0;
}

/* Email notification checkboxes layout */
.flex.items-center.space-x-6 {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .flex.items-center.space-x-6 {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

input:disabled, select:disabled, textarea:disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.7;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    opacity: 1;
}

label[for="enableShipperInfo"],
label[for="sendAdminEmail"],
label[for="sendReceiverEmail"] {
    font-size: 14px;
}

.form-field-label:not([for="enableShipperInfo"], [for="sendAdminEmail"], [for="sendReceiverEmail"]) {
    font-size: 13px;
    margin-bottom: 3px;
}

@media (max-width: 767px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
        visibility: hidden;
        opacity: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar.expanded {
        width: 100%;
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
    }
    .sidebar.expanded .sidebar-header h3,
    .sidebar.expanded .sidebar-menu li span,
    .sidebar.expanded .logout-btn span {
        display: inline;
    }
    .sidebar.expanded .sidebar-menu li a,
    .sidebar.expanded .sidebar-menu li span.menu-item-content {
        justify-content: flex-start;
        padding: 12px 20px;
    }
    .sidebar.expanded .sidebar-menu li i {
        margin-right: 12px;
    }
    .sidebar.expanded .close-menu {
        display: block;
    }
    .content {
        padding: 15px;
    }
    .awpcargo-frontend-dashboard .table-min-width {
        min-width: 500px;
    }
    .awpcargo-frontend-dashboard .table-min-width thead th,
    .awpcargo-frontend-dashboard .table-min-width tbody td {
        padding: 12px 16px;
    }
    .awpcargo-frontend-dashboard .action-buttons {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
    .awpcargo-frontend-dashboard .action-buttons a {
        padding: 2px;
        font-size: 12px;
    }
    /* Hide date column on mobile */
    .awpcargo-frontend-dashboard .table-min-width th:nth-child(4),
    .awpcargo-frontend-dashboard .table-min-width td:nth-child(4) {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar {
        width: 0;
        transform: translateX(-100%);
        visibility: hidden;
        opacity: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar.expanded {
        width: 280px;
        transform: translateX(0);
        visibility: visible;
        opacity: 1;
        box-shadow: 3px 0 15px rgba(0,0,0,0.2);
    }
    .sidebar.expanded .sidebar-header h3,
    .sidebar.expanded .sidebar-menu li span,
    .sidebar.expanded .logout-btn span {
        display: inline;
    }
    .sidebar.expanded .sidebar-menu li a,
    .sidebar.expanded .sidebar-menu li span.menu-item-content {
        justify-content: flex-start;
        padding: 12px 20px;
    }
    .sidebar.expanded .sidebar-menu li i {
        margin-right: 12px;
    }
    .sidebar.expanded .close-menu {
        display: block;
    }
}

/* Shipment Details Layout */
.shipment-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.shipment-details-grid .full-width {
    grid-column: 1 / -1;
}

/* Shipment Status and Type take 1 column (25%) */
.shipment-details-grid > div:nth-child(1),
.shipment-details-grid > div:nth-child(2) {
    grid-column: span 1;
}

/* Other fields take 2 columns (50%) */
.shipment-details-grid > div:nth-child(3),
.shipment-details-grid > div:nth-child(4),
.shipment-details-grid > div:nth-child(5),
.shipment-details-grid > div:nth-child(6),
.shipment-details-grid > div:nth-child(7) {
    grid-column: span 2;
}

@media (max-width: 767px) {
    .shipment-details-grid {
        grid-template-columns: 1fr;
    }
    
    .shipment-details-grid > div {
        grid-column: 1 / -1;
    }
}

/* Section Headers */
.section-header {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    padding-bottom: 0.75rem;
    margin: 5px 0;
    border-bottom: 2px solid #e5e7eb;
}

#infoContainer {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: start;
}

#senderInfo, #receiverInfo {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#senderInfo .space-y-6, #receiverInfo .space-y-6 {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@media (max-width: 767px) {
    #infoContainer {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

#senderInfo, #receiverInfo, .mt-6 {
    margin-top: 5px;
}

.address-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.address-fields-grid > div {
    margin-bottom: 0;
}

@media (max-width: 767px) {
    .address-fields-grid {
        grid-template-columns: 1fr;
    }
}

/* Prefix Text and ID Length inline layout */
.flex.flex-wrap.items-end.space-x-0.md\:space-x-4.md\:flex-nowrap {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 1.5rem;
}

.flex.flex-wrap.items-end.space-x-0.md\:space-x-4.md\:flex-nowrap > div {
    flex: 1;
    min-width: 0;
}

@media (max-width: 767px) {
    .flex.flex-wrap.items-end.space-x-0.md\:space-x-4.md\:flex-nowrap {
        flex-direction: column;
        gap: 1rem;
    }
    
    .flex.flex-wrap.items-end.space-x-0.md\:space-x-4.md\:flex-nowrap > div {
        width: 100%;
    }
}

.form-field-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}

/* Override any other label margins */
label[for]:not(.checkbox-container label) {
    margin-bottom: 3px !important;
}

/* Ensure checkbox labels don't get affected */
.checkbox-container label {
    margin-bottom: 0;
}