.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    padding: 20px;
}

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

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 48px 40px;
    text-align: center;
}

.login-header {
    margin-bottom: 32px;
}

.login-logo {
    height: 60px;
    width: auto;
    margin-bottom: 24px;
}

.login-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(54, 124, 43, 0.1);
}

.login-form .form-group input::placeholder {
    color: var(--text-muted);
}

.login-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 16px;
    text-align: center;
    min-height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-error.show {
    opacity: 1;
}

.login-form .btn {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-form .btn:hover {
    background: var(--primary-dark);
}

.login-form .btn:active {
    transform: scale(0.98);
}

/* Login Page Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 20px;
        border-radius: 16px;
    }
    
    .login-logo {
        height: 48px;
        margin-bottom: 16px;
    }
    
    .login-header h1 {
        font-size: 1.25rem;
    }
    
    .login-header p {
        font-size: 0.85rem;
    }
    
    .login-form .form-group input {
        padding: 12px 14px;
    }
}

@media (max-width: 360px) {
    .login-card {
        padding: 24px 16px;
    }
}
    font-size: 1rem;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
}

.login-footer a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: var(--primary-light);
}

/* Dashboard Styles */
.dashboard-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-dark);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    height: 36px;
    width: auto;
}

.sidebar-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px;
    margin-bottom: 12px;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(54, 124, 43, 0.05);
}

.nav-item.active {
    color: var(--primary-light);
    background: rgba(54, 124, 43, 0.1);
    border-left-color: var(--primary);
}

.nav-item svg {
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.back-to-site {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.back-to-site:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #ef4444;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    min-height: 100vh;
    overflow-x: hidden;
}

.content-header {
    padding: 24px 32px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.content-area {
    padding: 32px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(54, 124, 43, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    flex-shrink: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-info .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Recent Section */
.recent-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
}

.recent-section .section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

/* Data Table */
.data-table {
    overflow-x: auto;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.data-table th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.2);
}

.data-table td {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: rgba(54, 124, 43, 0.03);
}

/* Clickable Table Rows */
.clickable-row {
    cursor: pointer;
    transition: background 0.2s ease;
}

.clickable-row:hover td {
    background: rgba(54, 124, 43, 0.08) !important;
}

.clickable-row .actions-cell {
    cursor: default;
}

.clickable-row .actions-cell button {
    cursor: pointer;
}

/* Clickable Schedule Cell */
.clickable-schedule {
    cursor: pointer !important;
    transition: background 0.2s ease;
}

.clickable-schedule:hover {
    background: rgba(54, 124, 43, 0.15) !important;
}

.schedule-placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.scheduled-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.scheduled-date.has-date {
    color: #3b82f6;
    font-weight: 500;
}

/* Status Badges */
.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.pending {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.status.approved {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status.scheduled {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.status.completed {
    background: rgba(54, 124, 43, 0.15);
    color: var(--primary-light);
}

.action-btn {
    padding: 6px 12px;
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--primary-light);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

.actions-cell {
    display: flex;
    gap: 8px;
    align-items: center;
}

.delete-btn {
    padding: 6px 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Profiles Grid */
.profiles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.profile-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: var(--border);
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.profile-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-details .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-details .detail-row:last-child {
    border-bottom: none;
}

.profile-details .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-details span:last-child {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}

.report-icon {
    width: 48px;
    height: 48px;
    background: rgba(54, 124, 43, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--primary-light);
}

.report-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.report-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.report-change {
    font-size: 0.8rem;
    font-weight: 500;
}

.report-change.positive {
    color: #22c55e;
}

.report-change.negative {
    color: #ef4444;
}

/* Chart Placeholder */
.chart-placeholder {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
}

.chart-placeholder h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.chart-visual {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding-top: 40px;
}

.chart-bar {
    width: 60px;
    background: var(--gradient);
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    opacity: 0.8;
}

.chart-bar span {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Settings */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.settings-section h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.settings-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.settings-form .form-group {
    margin-bottom: 20px;
}

.settings-form .form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.settings-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.settings-form .form-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.settings-form .form-group input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-form .btn {
    padding: 12px 24px;
}

/* Responsive styles are below in the comprehensive section */

/* Denied status */
.status.denied {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

/* Modal Styles */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
}

/* Delete Modal */
.delete-modal {
    max-width: 400px;
}

.delete-modal .modal-body {
    text-align: center;
    padding: 24px;
}

.delete-warning {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 8px;
}

/* Button Success/Danger */
.btn-success {
    background: #22c55e;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Application Detail Styles */
.application-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.detail-id {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-item span {
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Map View Button */
.map-view-btn {
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 6px;
    margin-left: 8px;
    cursor: pointer;
    color: var(--primary-light);
    vertical-align: middle;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.map-view-btn:hover {
    background: rgba(54, 124, 43, 0.2);
}

/* Calculator View Button */
.calc-view-btn {
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 6px;
    margin-left: 8px;
    cursor: pointer;
    color: var(--primary-light);
    vertical-align: middle;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calc-view-btn:hover {
    background: rgba(54, 124, 43, 0.2);
}

/* Field Header Row */
.field-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.field-header-row h4 {
    margin: 0;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
}

/* Field Status Buttons */
.field-status-btn {
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.field-status-btn.not-complete {
    background: #ef4444;
    color: white;
}

.field-status-btn.not-complete:hover {
    background: #dc2626;
}

.field-status-btn.complete {
    background: #22c55e;
    color: white;
}

.field-status-btn.complete:hover {
    background: #16a34a;
}

/* In Progress Status */
.status.in_progress {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-color: rgba(245, 158, 11, 0.3);
}

.detail-field-group {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

.detail-field-group h4 {
    margin-bottom: 12px;
    color: var(--text-primary);
    text-transform: none;
    letter-spacing: 0;
}

.detail-message {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

/* Mobile Menu Toggle Button */
.navbar-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

.navbar-mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   RESPONSIVE DESIGN - DESKTOP (max-width: 1200px)
   ============================================ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reports-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE DESIGN - TABLET (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .navbar-mobile-toggle {
        display: flex;
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    .data-table table {
        min-width: 700px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE (max-width: 768px)
   Handles portrait phones and small tablets
   ============================================ */
@media (max-width: 768px) {
    .content-header {
        flex-wrap: wrap;
        padding: 12px;
        gap: 8px;
    }
    
    .header-left {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
    }
    
    .navbar-mobile-toggle {
        flex-shrink: 0;
    }
    
    .header-left h1 {
        font-size: 1rem;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
        padding-top: 4px;
    }
    
    .admin-name {
        font-size: 0.8rem;
    }
    
    .content-area {
        padding: 12px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
    
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .stat-info {
        text-align: right;
        flex: 1;
    }
    
    .stat-info .stat-value {
        font-size: 1.1rem;
    }
    
    .stat-info .stat-label {
        font-size: 0.65rem;
    }
    
    .recent-section {
        padding: 12px;
        overflow: hidden;
    }
    
    .recent-section .section-title {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }
    
    .data-table {
        font-size: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .data-table table {
        min-width: 550px;
    }
    
    .data-table table {
        min-width: 500px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 6px;
        white-space: nowrap;
        font-size: 0.7rem;
    }
    
    .data-table th {
        font-size: 0.6rem;
        text-transform: uppercase;
    }
    
    .action-btn {
        padding: 4px 8px;
        font-size: 0.65rem;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .sidebar-header {
        padding: 16px;
    }
    
    .nav-item {
        padding: 12px 16px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: calc(100% - 16px);
        margin: 8px;
        max-height: calc(100vh - 16px);
    }
    
    .modal-header {
        padding: 12px 16px;
    }
    
    .modal-header h3 {
        font-size: 0.95rem;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .detail-id {
        font-size: 1.1rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .detail-field-group {
        padding: 10px;
    }
    
    .detail-field-group h4 {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 8px;
        margin-bottom: 16px;
    }
    
    .page-header p {
        font-size: 0.85rem;
    }
    
    .category-manager {
        padding: 12px;
    }
    
    .add-category {
        flex-direction: column;
        width: 100%;
    }
    
    .add-category input {
        width: 100%;
    }
    
    .profile-card {
        padding: 12px;
    }
    
    .profile-header h3 {
        font-size: 0.95rem;
    }
    
    .profiles-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-visual {
        height: 120px;
    }
    
    .chart-bar {
        width: 30px;
    }
    
    .upload-area {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }
    
    .upload-area .upload-text {
        margin: 8px 0;
    }
    
    .documents-filter {
        flex-direction: column;
        gap: 8px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        width: 100%;
    }
    
    .documents-grid {
        grid-template-columns: 1fr;
    }
    
    .chemical-selector {
        flex-direction: column;
    }
    
    .custom-chemical-input {
        flex-direction: column;
    }
    
    .application-detail-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* ============================================
   RESPONSIVE DESIGN - PORTRAIT PHONE (max-width: 480px)
   Extra small screens
   ============================================ */
@media (max-width: 480px) {
    .content-header {
        padding: 10px;
    }
    
    .header-left h1 {
        font-size: 0.9rem;
    }
    
    .content-area {
        padding: 8px;
    }
    
    .stats-grid {
        gap: 8px;
    }
    
    .stat-card {
        padding: 10px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .stat-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .stat-info .stat-value {
        font-size: 1rem;
    }
    
    .stat-info .stat-label {
        font-size: 0.6rem;
    }
    
    .data-table {
        font-size: 0.65rem;
    }
    
    .data-table table {
        min-width: 400px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
    }
    
    .data-table th {
        font-size: 0.55rem;
    }
    
    /* Hide less important columns on small screens */
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        display: none;
    }
    
    /* Also hide status column text, keep badge only */
    .data-table td:nth-child(5) {
        white-space: normal;
    }
    
    .action-btn {
        padding: 3px 6px;
        font-size: 0.6rem;
    }
    
    .nav-item {
        padding: 10px 14px;
        font-size: 0.85rem;
    }
    
    .modal-header h3 {
        font-size: 0.85rem;
    }
    
    .modal-header {
        padding: 10px 12px;
    }
    
    .modal-body {
        padding: 12px;
    }
    
    .detail-id {
        font-size: 1rem;
    }
    
    .detail-section h4 {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    .recent-section .section-title {
        font-size: 0.85rem;
    }
    
    .chart-visual {
        height: 100px;
    }
    
    .chart-bar {
        width: 24px;
    }
    
    .chart-bar span {
        font-size: 0.7rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN - LARGE SCREENS
   ============================================ */
@media (min-width: 1400px) {
    .content-area {
        padding: 32px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .data-table {
        font-size: 0.95rem;
    }
}

/* ============================================
   SIDEBAR OVERLAY FOR MOBILE
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* ============================================
   JOBS - SCHEDULE CELL
   ============================================ */
.schedule-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

.calendar-btn {
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 6px 8px;
    cursor: pointer;
    color: var(--primary-light);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-btn:hover {
    background: rgba(54, 124, 43, 0.2);
    border-color: var(--primary);
}

.scheduled-date {
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ============================================
   CALENDAR MODAL
   ============================================ */
.calendar-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.calendar-modal.active {
    display: flex;
}

.calendar-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    width: 350px;
    max-width: 95vw;
    box-shadow: var(--shadow-lg);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-nav {
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.calendar-nav:hover {
    background: rgba(54, 124, 43, 0.2);
}

.calendar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0 8px;
}

.calendar-close:hover {
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    text-align: center;
    padding: 10px 4px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover:not(.empty):not(.past) {
    background: rgba(54, 124, 43, 0.2);
    color: var(--primary-light);
}

.calendar-day.today {
    background: rgba(54, 124, 43, 0.1);
    border: 1px solid var(--primary);
    font-weight: 600;
}

.calendar-day.past {
    color: var(--text-muted);
    cursor: default;
    opacity: 0.5;
}

.calendar-day.empty {
    cursor: default;
    background: transparent;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .navbar,
    .modal,
    .btn,
    .nav-item {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 20px;
    }
    
    .stat-card,
    .data-table {
        break-inside: avoid;
    }
}

/* ============================================
   CHEMICAL INFORMATION MANAGEMENT SYSTEM
   ============================================ */

.chemical-list-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 400px;
    overflow: hidden;
}

.chemical-table-wrapper {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
}

.chemical-manager-table {
    border-collapse: collapse;
    font-size: 0.9rem;
    white-space: nowrap;
}

.chemical-manager-table th,
.chemical-manager-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.chemical-manager-table th {
    background: var(--bg-dark);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}

.chemical-manager-table th .th-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chemical-manager-table th .remove-col-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 1;
}

.chemical-manager-table th:hover .remove-col-btn {
    opacity: 1;
}

.chemical-manager-table th .remove-col-btn:hover {
    color: #dc3545;
}

.chemical-manager-table tbody tr:hover {
    background: rgba(54, 124, 43, 0.05);
}

.chemical-manager-table input,
.chemical-manager-table select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.85rem;
    min-width: 80px;
}

.chemical-manager-table input:focus,
.chemical-manager-table select:focus {
    outline: none;
    border-color: var(--primary);
}

.verified-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    white-space: nowrap;
}

.verified-btn.unverified {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.verified-btn.unverified:hover {
    background: rgba(220, 53, 69, 0.25);
}

.verified-btn.verified {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.verified-btn.verified:hover {
    background: rgba(40, 167, 69, 0.25);
}

.delete-row-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 10px;
    font-size: 1.3rem;
    line-height: 1;
}

.delete-row-btn:hover {
    color: #dc3545;
}

.chemical-list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* Modal Overlay */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

/* Column Manager Modal */
.column-manager-modal {
    width: 500px;
    max-width: 90%;
}

.column-manager-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-dark);
}

.column-manager-modal .modal-header h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.column-manager-modal .modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
}

.column-manager-modal .modal-close:hover {
    color: var(--text-primary);
}

.column-manager-modal .modal-body {
    padding: 20px 24px;
    max-height: 400px;
    overflow-y: auto;
}

.column-manager-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-card);
}

.column-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    cursor: grab;
    transition: all 0.2s;
}

.column-item:hover {
    background: rgba(54, 124, 43, 0.1);
}

.column-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.column-item.drag-over {
    border-color: var(--primary);
    background: rgba(54, 124, 43, 0.15);
}

.drag-handle {
    color: var(--text-muted);
    cursor: grab;
    font-size: 1rem;
    padding: 4px;
}

.drag-handle:hover {
    color: var(--text-primary);
}

.column-item input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.column-item input:focus {
    outline: none;
    border-color: var(--primary);
}

.column-item .remove-col-btn {
    background: rgba(220, 53, 69, 0.15);
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.2s;
}

.column-item .remove-col-btn:hover {
    background: rgba(220, 53, 69, 0.25);
}

.col-locked {
    display: inline-block;
    width: 36px;
}

/* Page header with button */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 16px;
}

.page-header h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.page-header p {
    margin: 0;
}

.page-header .btn {
    flex-shrink: 0;
}

.chemical-search {
    flex: 1;
    max-width: 300px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.chemical-search:focus {
    outline: none;
    border-color: var(--primary);
}

.chemical-search::placeholder {
    color: var(--text-muted);
}

/* Chemical Searchable Dropdown */
.chemical-search-wrapper {
    position: relative;
    width: 100%;
}

.chemical-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.chemical-search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chemical-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 6px 6px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.chemical-dropdown .dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.chemical-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

.chemical-dropdown .dropdown-item:hover {
    background: rgba(54, 124, 43, 0.1);
}

.chemical-dropdown .dropdown-item.hidden {
    display: none;
}