/* Mobile-First DHB-Themed Tax Collector App */
:root {
    --dhb-dark-green: #0A7A2F;
    --dhb-medium-green: #1FAE4B;
    --dhb-light-green: #70D68B;
    --dhb-white: #FFFFFF;
    --dhb-dark-text: #1B1B1B;
    --dhb-gradient: linear-gradient(135deg, #0A7A2F 0%, #1FAE4B 50%, #70D68B 100%);
    --dhb-gradient-reverse: linear-gradient(135deg, #70D68B 0%, #1FAE4B 50%, #0A7A2F 100%);
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --box-shadow: 0 4px 12px rgba(10, 122, 47, 0.15);
    --box-shadow-lg: 0 8px 24px rgba(10, 122, 47, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to bottom, #FFFFFF, rgba(112, 214, 139, 0.1));
    color: var(--dhb-dark-text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page - Mobile First */
.login-page {
    background: var(--dhb-gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow-lg);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(10, 122, 47, 0.2);
}

.login-header h1 {
    color: var(--dhb-dark-green);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
}

/* Form Styles - Mobile First */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dhb-dark-text);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    transition: var(--transition);
    background: var(--dhb-white);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--dhb-medium-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(31, 174, 75, 0.1);
}

/* Button Styles - Mobile First */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--dhb-gradient);
    color: var(--dhb-white);
    box-shadow: var(--box-shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: var(--dhb-medium-green);
    color: var(--dhb-white);
    box-shadow: var(--box-shadow);
}

.btn-success:hover {
    background: var(--dhb-dark-green);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--dhb-white);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--dhb-dark-text);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--dhb-medium-green);
    color: var(--dhb-medium-green);
}

.btn-outline:hover {
    background: var(--dhb-medium-green);
    color: var(--dhb-white);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 14px;
}

.btn-large {
    padding: 18px 36px;
    font-size: 18px;
}

/* App Container - Mobile First */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: var(--dhb-white);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

/* Header - Mobile First */
.app-header {
    background: var(--dhb-gradient);
    color: var(--dhb-white);
    padding: 1.25rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(10, 122, 47, 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    font-size: 1.35rem;
    margin: 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.back-btn {
    color: var(--dhb-white);
    text-decoration: none;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-info {
    text-align: right;
}

.collector-name {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.station-code {
    font-size: 0.8rem;
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 2px;
}

/* Stats Grid - FULLY RESPONSIVE MOBILE FIRST */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stat-card {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: var(--transition);
    border: 1px solid rgba(10, 122, 47, 0.1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--grad-dhb);
    opacity: 0.95;
    z-index: 0;
    border-radius: var(--border-radius);
}

.stat-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(10, 122, 47, 0.25);
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--dhb-white);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.stat-info {
    text-align: center;
    width: 100%;
}

.stat-info h3 {
    font-size: 2.25rem;
    margin-bottom: 0.25rem;
    color: var(--dhb-white);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.stat-info p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-trend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* DHB Premium Gradient Themes */
.gradient-total {
    --grad-dhb: linear-gradient(135deg, #0A7A2F 0%, #1FAE4B 100%);
}

.gradient-paid {
    --grad-dhb: linear-gradient(135deg, #1FAE4B 0%, #70D68B 100%);
}

.gradient-unpaid {
    --grad-dhb: linear-gradient(135deg, #70D68B 0%, #0A7A2F 100%);
}

.gradient-revenue {
    --grad-dhb: linear-gradient(135deg, #0A7A2F 0%, #70D68B 100%);
}

.gradient-previous {
    --grad-dhb: linear-gradient(135deg, #70D68B 0%, #1FAE4B 100%);
}

.gradient-total-collected {
    --grad-dhb: linear-gradient(135deg, #1FAE4B 0%, #0A7A2F 100%);
}

/* Quick Actions - Mobile First */
.quick-actions {
    padding: 1rem;
 
}

.quick-actions h2 {
    margin-bottom: 1rem;
    font-size: 2.3rem;
    color: var(--dhb-dark-green);
    font-weight: 700;
}

.action-buttons {
    display: grid;
    gap: 1rem;
}

.action-btn {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-decoration: none;
    color: var(--dhb-dark-text);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
}

/* .action-btn.primary {
    border-left-color: var(--dhb-dark-green);
}

.action-btn.warning {
    border-left-color: var(--warning-color);
}

.action-btn.success {
    border-left-color: var(--dhb-medium-green);
} */
 .action-btn.info {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

.action-btn.success {
    background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
}

.action-btn.warning {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
}

.action-btn:hover {
    transform: translateX(6px);
    box-shadow: var(--box-shadow-lg);
}

.action-btn i {
    font-size: 2.75rem;
    color: white;
}

/* Bottom Navigation - Mobile First */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dhb-white);
    border-top: 1px solid rgba(10, 122, 47, 0.1);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    font-size: 0.75rem;
    gap: 4px;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    font-weight: 500;
}

.nav-item.active {
    color: var(--dhb-medium-green);
    background: rgba(31, 174, 75, 0.1);
}

.nav-item:hover {
    color: var(--dhb-medium-green);
}

.nav-item i {
    font-size: 1.35rem;
}

/* Vehicle Card - Mobile First */
.vehicle-card {
    margin: 1rem;
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
}

.vehicle-header {
    padding: 2rem;
    color: var(--dhb-white);
    text-align: center;
}

.vehicle-header.status-paid {
    background: var(--dhb-gradient);
}

.vehicle-header.status-unpaid {
    background: linear-gradient(135deg, #0A7A2F, #1B1B1B);
}

.plate-number {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.plate-number h2 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.owner-name {
    font-size: 1.25rem;
    opacity: 0.95;
    margin: 0;
}

.vehicle-details {
    padding: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(10, 122, 47, 0.1);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    color: var(--dhb-dark-green);
    font-weight: 600;
}

.payment-section {
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(112, 214, 139, 0.1));
}

.payment-amount h3 {
    font-size: 2.25rem;
    color: var(--dhb-dark-green);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

/* Badges - Mobile First */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background: var(--dhb-light-green);
    color: var(--dhb-dark-green);
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge {
    padding: 10px 18px;
    border-radius: 24px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Alerts - Mobile First */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-sm);
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-success {
    background: rgba(112, 214, 139, 0.2);
    color: var(--dhb-dark-green);
    border: 1px solid var(--dhb-light-green);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* History Section - Mobile First */
.history-section {
    padding: 1rem;
}

.history-section h3 {
    margin-bottom: 1rem;
    color: var(--dhb-dark-green);
    font-weight: 700;
}

.payment-history {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--dhb-white);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--dhb-light-green);
}

.history-details {
    flex: 1;
    margin: 0 1rem;
}

.history-details strong {
    display: block;
    color: var(--dhb-dark-green);
    font-weight: 600;
}

.history-amount {
    font-weight: 700;
    color: var(--dhb-medium-green);
    font-size: 1.1rem;
}

/* Pending List - Mobile First */
.pending-list {
    padding: 1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: var(--dhb-light-green);
}

.pending-item {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--warning-color);
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.item-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Report Styles - FULLY RESPONSIVE MOBILE FIRST */
.report-filters {
    padding: 1rem;
    background: var(--dhb-white);
    margin: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-summary {
    padding: 1rem;
}

.summary-card {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.stat {
    text-align: center;
    padding: 1.25rem;
    background: rgba(112, 214, 139, 0.1);
    border-radius: var(--border-radius-sm);
    border: 2px solid rgba(10, 122, 47, 0.1);
}

.stat .number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dhb-dark-green);
}

.stat .label {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.report-table {
    padding: 1rem;
}

.table-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.table-header h3 {
    color: var(--dhb-dark-green);
    font-weight: 700;
}

.table-container {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    overflow-x: auto;
    box-shadow: var(--box-shadow);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(10, 122, 47, 0.1);
}

th {
    background: linear-gradient(135deg, rgba(10, 122, 47, 0.05), rgba(31, 174, 75, 0.05));
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dhb-dark-green);
    position: sticky;
    top: 0;
}

.status-completed {
    background: rgba(112, 214, 139, 0.1);
}

.status-pending {
    background: #fffbf0;
}

.manual-search-section {
    padding: 1rem;
    text-align: center;
}

/* Multiple Days Payment - Mobile First */
.multiple-days-option {
    margin-top: 1rem;
    padding: 1.25rem;
    background: #fffbf0;
    border-radius: var(--border-radius-sm);
    border-left: 4px solid var(--warning-color);
}

.total-unpaid {
    background: rgba(10, 122, 47, 0.05);
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    margin-top: 1rem;
    border: 2px solid var(--dhb-light-green);
}

.total-unpaid .label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--dhb-dark-green);
}

.total-unpaid .value {
    font-size: 1.4rem;
    color: var(--dhb-medium-green);
    font-weight: 700;
}

/* Public Welcome Section - Mobile First */
.public-welcome {
    padding: 2rem 1rem;
}

.welcome-card {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow-lg);
}

.welcome-icon {
    font-size: 4.5rem;
    background: var(--dhb-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.welcome-features {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(112, 214, 139, 0.1);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.feature:hover {
    background: rgba(112, 214, 139, 0.2);
}

.feature i {
    color: var(--dhb-medium-green);
    font-size: 1.5rem;
}

/* Profile Page Styles - Mobile First */
.profile-container {
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background: var(--dhb-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.profile-header {
    background: var(--dhb-gradient);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--dhb-white);
}

.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    border: 4px solid var(--dhb-white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.profile-role {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 20px;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
}

.profile-body {
    padding: 1.5rem;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.info-item {
    border-bottom: 1px solid rgba(10, 122, 47, 0.1);
    padding-bottom: 1rem;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.info-value {
    font-size: 1.05rem;
    color: var(--dhb-dark-text);
    font-weight: 600;
}

.profile-actions {
    padding: 1.5rem;
    border-top: 1px solid rgba(10, 122, 47, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Table Footer */
.table-total {
    background: rgba(10, 122, 47, 0.05);
    font-weight: 700;
    border-top: 3px solid var(--dhb-dark-green);
}

.table-total td {
    padding: 1.25rem;
    background: rgba(10, 122, 47, 0.05);
    color: var(--dhb-dark-green);
}

/* Export Buttons */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.table-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: #666; }
.text-success { color: var(--dhb-medium-green); }
.text-danger { color: var(--danger-color); }
.mt-3 { margin-top: 1rem; }
.mb-3 { margin-bottom: 1rem; }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--dhb-light-green);
    border-top-color: var(--dhb-dark-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
    .app-container {
        padding-top: env(safe-area-inset-top);
        padding-bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    .bottom-nav {
        padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    }
}

/* Tablet (min-width: 640px) - 2 columns for stat cards */
@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .summary-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-info {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .profile-actions {
        flex-direction: row;
    }
    
    .table-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* Tablet/Desktop (min-width: 768px) - 3 columns for stat cards */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .filter-form {
        flex-direction: row;
        align-items: flex-end;
    }
    
    .action-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop (min-width: 1024px) - 4 columns for stat cards */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .summary-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .app-container {
        max-width: 100%;
    }
}

/* Large Desktop (min-width: 1280px) - 6 columns for stat cards */
@media (min-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .stat-card {
        padding: 2rem;
    }
}

/* Small Mobile Optimization (max-width: 360px) */
@media (max-width: 360px) {
    .stat-card {
        padding: 1rem 0.75rem;
    }
    
    .stat-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.75rem;
    }
    
    .header-content h1 {
        font-size: 1.15rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* Print Styles */
@media print {
    .app-header,
    .report-filters,
    .manual-search-section,
    .table-actions,
    .bottom-nav,
    .profile-actions {
        display: none !important;
    }
    
    .app-container {
        max-width: none;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }
    
    .report-table {
        padding: 0;
    }
    
    .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
        overflow-x: visible;
    }
    
    table {
        width: 100%;
        font-size: 11px;
        min-width: auto;
    }
    
    th, td {
        padding: 6px;
        border: 1px solid #ddd;
    }
    
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

    .simple-error-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 400px;
        padding: 2rem;
        text-align: center;
    }

    .simple-error-icon {
        font-size: 3rem;
        color: #10b981;
        margin-bottom: 1rem;
    }

    .simple-error-title {
        font-size: 1.5rem;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 0.5rem;
    }

    .simple-error-text {
        color: #64748b;
        font-size: 1rem;
        margin-bottom: 2rem;
        max-width: 300px;
        line-height: 1.5;
    }

    .simple-btn-primary {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.5rem;
        background: #10b981;
        color: white;
        text-decoration: none;
        border-radius: 8px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .simple-btn-primary:hover {
        background: #059669;
        transform: translateY(-1px);
    }
    
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #28a745, #20c997);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    flex: 1;
    max-width: 80px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateY(-2px);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-3px);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    top: -8px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
}

.nav-item.active i {
    transform: scale(1.1);
}

.nav-item span {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

