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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    flex: 1;
}

/* Navigation */
.navbar {
    background-color: rgba(44, 62, 80, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-page .navbar {
    background-color: rgba(44, 62, 80, 0.8);
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.portal-name {
    display: inline-block;
}

@media (max-width: 768px) {
    .logo-img {
        height: 30px;
    }
    
    .portal-name {
        font-size: 1rem;
    }
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: #34495e;
}

.nav-user {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

/* Flash Messages */
.flash-messages {
    margin: 20px 0;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Authentication */
/* Login Page Specific Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 2rem 1rem;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 3rem 2.5rem;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.login-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

.login-form {
    margin-top: 2rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    transition: all 0.3s ease;
    padding: 0.875rem 1rem;
    font-size: 1rem;
}

.input-wrapper input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 2rem;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #555;
    cursor: pointer;
    user-select: none;
}

.remember-me input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.forgot-password-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.forgot-password-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.btn-login:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .login-header h1 {
        font-size: 1.75rem;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Legacy auth styles for other pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-card h1 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    text-align: center;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: #3498db;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.demo-credentials {
    margin-top: 1.5rem;
    padding: 1rem;
    background-color: #e8f4f8;
    border-radius: 4px;
    font-size: 0.9rem;
}

.demo-credentials p {
    margin: 0;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.875rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

/* Dashboard */
/* Pending Users Notification */
.pending-users-notification {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(245, 87, 108, 0.3);
    animation: slideDown 0.5s ease-out;
}

.pending-users-notification[data-pending-count="0"],
.pending-users-notification[style*="display: none"],
.pending-users-notification.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-text {
    flex: 1;
    font-size: 1rem;
    line-height: 1.5;
}

.notification-text strong {
    font-size: 1.25rem;
    font-weight: 700;
    margin-right: 0.25rem;
}

.notification-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #f5576c;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    white-space: nowrap;
}

.notification-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: #f8f9fa;
}

.notification-action svg {
    transition: transform 0.3s;
}

.notification-action:hover svg {
    transform: translateX(3px);
}

@media (max-width: 768px) {
    .notification-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .notification-action {
        width: 100%;
        justify-content: center;
    }
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-title-section h1 {
    color: #2c3e50;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.dashboard-subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    margin: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #f0f0f0;
}

.stat-link {
    cursor: pointer;
    display: block;
}

.stat-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-pre_shipment .stat-value {
    color: #f39c12;
}

.stat-shipped .stat-value {
    color: #3498db;
}

.stat-delivered .stat-value {
    color: #27ae60;
}

/* Arrival Stats Section */
.arrival-stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.arrival-card {
    background: white;
    border-radius: 12px;
    padding: 1.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.arrival-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.arrival-this-month .arrival-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.arrival-next-month .arrival-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.arrival-content {
    flex: 1;
}

.arrival-label {
    font-size: 0.875rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.arrival-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.arrival-this-month .arrival-value {
    color: #667eea;
}

.arrival-next-month .arrival-value {
    color: #f5576c;
}

/* Tables */
.documents-section {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.section-header {
    margin-bottom: 2rem;
}

.section-title-wrapper h2 {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.75rem;
    font-weight: 700;
}

.section-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin: 0;
}

/* Filters Card */
.filters-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
}

.btn-filter svg {
    flex-shrink: 0;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    table-layout: auto;
}

.data-table th:nth-child(1) { width: 12%; } /* Document Reference */
.data-table th:nth-child(2) { width: 10%; } /* R&B Reference */
.data-table th:nth-child(3) { width: 12%; } /* Supplier Name */
.data-table th:nth-child(4) { width: 10%; } /* Invoice Number */
.data-table th:nth-child(5) { width: 10%; } /* Container Reference */
.data-table th:nth-child(6) { width: 10%; } /* ETA UK Port */
.data-table th:nth-child(7) { width: 10%; } /* Status */
.data-table th:nth-child(8) { width: 12%; } /* Acknowledgments */
.data-table th:nth-child(9) { width: 8%; }  /* Actions */

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.data-table th {
    padding: 0.75rem 0.75rem;
    text-align: left;
    font-weight: 600;
    color: white;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.85rem;
    color: #2c3e50;
}

.data-table td:nth-child(1),
.data-table td:nth-child(3),
.data-table td:nth-child(4),
.data-table td:nth-child(5) {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.doc-ref {
    color: #667eea;
    font-weight: 600;
    font-size: 0.85rem;
    word-break: break-word;
    max-width: 150px;
    display: inline-block;
}

/* Acknowledgments */
.acknowledgments {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ack-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f0f0f0;
    color: #95a5a6;
    width: fit-content;
}

.ack-badge.ack-active {
    background: #e8f5e9;
    color: #27ae60;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    justify-content: center;
}

.btn-action {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    padding: 0;
}

.btn-action svg {
    width: 12px;
    height: 12px;
}

.btn-view {
    background: #e3f2fd;
    color: #1976d2;
}

.btn-view:hover {
    background: #1976d2;
    color: white;
    transform: translateY(-1px);
}

.btn-edit {
    background: #fff3e0;
    color: #f57c00;
}

.btn-edit:hover {
    background: #f57c00;
    color: white;
    transform: translateY(-1px);
}

.btn-delete {
    background: #ffebee;
    color: #d32f2f;
}

.btn-delete:hover {
    background: #d32f2f;
    color: white;
    transform: translateY(-1px);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-invoice {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-shipping {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.badge-pre_shipment {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge-shipped {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-delivered {
    background-color: #e8f5e9;
    color: #388e3c;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.empty-state p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Document View */
.document-view {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.document-info {
    margin-bottom: 2rem;
}

.info-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #3498db;
}

.info-group {
    display: flex;
    flex-direction: column;
    padding: 0.875rem 0;
    gap: 0.35rem;
}

.info-group:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.info-group label,
.info-group .info-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
    display: block;
}

.info-value {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.5;
}

.info-value.highlight-value {
    color: #3498db;
    font-weight: 600;
    font-size: 1.05rem;
}

.document-actions {
    margin-bottom: 2rem;
}

.status-update-form {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #eee;
}

.status-update-form h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

.form-container {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-container h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
}

.upload-form {
    margin-top: 1rem;
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    /* Container adjustments */
    .container {
        padding: 1rem;
    }

    /* Navigation - Mobile Menu */
    .navbar .container {
        flex-wrap: nowrap;
        padding: 0.75rem 1rem;
    }

    .nav-brand a {
        font-size: 1.1rem;
    }

    .portal-name {
        display: none; /* Hide on very small screens */
    }

    .nav-menu {
        display: none; /* Will be shown via hamburger menu if needed */
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: center;
        border-radius: 6px;
    }

    /* Dashboard */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.5rem;
    }

    .dashboard-title-section h1 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .dashboard-subtitle {
        font-size: 0.9rem;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    /* Arrival Stats */
    .arrival-stats-section {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .arrival-card {
        padding: 1.25rem;
    }

    .arrival-icon {
        width: 48px;
        height: 48px;
    }

    .arrival-value {
        font-size: 1.75rem;
    }

    /* Filters */
    .filters-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .filters-form {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .btn-filter {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1rem;
    }

    /* Tables - Mobile Optimized */
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .data-table {
        font-size: 0.75rem;
        min-width: 800px;
    }

    .data-table th {
        padding: 0.5rem 0.4rem;
        font-size: 0.7rem;
    }

    .data-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.75rem;
    }

    .doc-ref {
        max-width: 100px;
        font-size: 0.75rem;
    }

    /* Acknowledgments - Stack on mobile */
    .acknowledgments {
        gap: 0.25rem;
    }

    .ack-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }

    /* Action Buttons - Larger touch targets */
    .action-buttons {
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .btn-action {
        width: 32px;
        height: 32px;
    }

    .btn-action svg {
        width: 14px;
        height: 14px;
    }

    /* Document View */
    .document-view {
        padding: 1rem;
        margin: 0 -1rem;
    }

    .document-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .info-section {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .info-group {
        flex-direction: column;
        padding: 0.75rem 0;
    }

    .info-group .info-label {
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.95rem;
    }

    /* Forms */
    .form-container {
        padding: 1.5rem 1rem;
        margin: 0 -1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        touch-action: manipulation; /* Better touch response */
    }

    /* Buttons - Larger touch targets */
    .btn-sm {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Cards */
    .documents-section {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    .section-title-wrapper h2 {
        font-size: 1.5rem;
    }

    /* Empty State */
    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

    /* Currency Stats - Stack on mobile */
    .currency-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .currency-card {
        width: 100%;
    }
}

/* Extra Small Devices */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    .login-card {
        padding: 1.5rem 1.25rem;
        margin: 0 0.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .dashboard-title-section h1 {
        font-size: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .arrival-value {
        font-size: 1.5rem;
    }

    .data-table {
        min-width: 700px;
        font-size: 0.7rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.4rem 0.3rem;
    }

    .btn-action {
        width: 36px;
        height: 36px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .arrival-stats-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .filters-form {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px; /* iOS recommended touch target */
    }

    .nav-menu a {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    .stat-link:hover {
        transform: none;
    }

    .arrival-card:hover {
        transform: none;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .login-main {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .dashboard-title-section h1 {
        font-size: 1.5rem;
    }
}
