/* Modern Professional Theme */
:root {
    /* Color Palette - Red & Black */
    --primary-color: #DC2626;
    /* Red 600 */
    --primary-hover: #B91C1C;
    /* Red 700 */
    --bg-color: #f8fafc;
    /* Slate 50 */
    --surface-color: #ffffff;
    /* White */
    --text-main: #111827;
    /* Gray 900 */
    --text-muted: #4B5563;
    /* Gray 600 */
    --border-color: #e2e8f0;
    /* Slate 200 */
    --input-border: #cbd5e1;
    /* Slate 300 */
    --focus-ring: rgba(37, 99, 235, 0.2);

    /* Status Colors */
    --success: #10b981;
    /* Emerald 500 */
    --warning: #f59e0b;
    /* Amber 500 */
    --danger: #DC2626;
    /* Red 600 - Matches Primary */
    --info: #3b82f6;
    /* Blue 500 */

    /* Spacing & Radius */
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --shadow-sm: none;
    --shadow-md: none;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-terlapor {
    background-color: var(--warning);
    color: white;
}

.status-pending {
    background-color: #6b7280;
    /* Grey */
    color: white;
}

.status-dikerjakan {
    background-color: var(--info);
    /* Blue */
    color: white;
}

.status-selesai {
    background-color: var(--success);
    /* Green */
    color: white;
}

/* Priority Badges */
.priority-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
}

.priority-critical,
.priority-high {
    background-color: var(--danger);
}

.priority-moderate,
.priority-medium {
    background-color: var(--warning);
}

.priority-low {
    background-color: var(--info);
}

/* Ticket Details */
.details-card {
    background: var(--surface-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    max-width: 800px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.detail-title {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-main);
}

.detail-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

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

.detail-item label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 4px;
    display: block;
}

.detail-value {
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.detail-section {
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.detail-info-box {
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin: 0;
}

.evidence-img {
    max-width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.action-buttons {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    align-items: center;
}

/* Reset & Base */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-main);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.subtitle {
    color: var(--text-muted);
    margin-bottom: 32px;
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    background-color: var(--surface-color);
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Buttons */
button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.login-btn,
.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.login-btn:hover,
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

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

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

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

.btn-warning {
    background-color: #f59e0b;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    width: auto;
}

/* Sidebar */
.sidebar {
    background-color: var(--surface-color);
    border-right: 1px solid var(--border-color);
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    box-shadow: var(--shadow-sm);
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: 80px;
}



body.with-sidebar {
    padding-left: 250px;
    padding-top: 0;
    transition: padding-left 0.3s ease;
}

body.sidebar-collapsed {
    padding-left: 80px;
}

.sidebar-header {
    padding: 0 16px 20px;
    /* Reduced padding to give more space */
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 10px;
    /* Add gap between logo and toggle */
}

.sidebar.collapsed .sidebar-header {
    padding: 0 10px 20px;
    justify-content: center;
}

.company-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    /* Allow taking available space */
    min-width: 0;
    /* Allow shrinking below content size */
}

.sidebar.collapsed .company-logo span {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.mobile-toggle-btn {
    display: none;
}

.sidebar-toggle:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
    /* Hide toggle inside header when collapsed, maybe move it? Or keep it? */
    /* Better UX: Keep toggle button visible. Let's adjust header layout. */
    display: block;
    margin: 0 auto;
}

/* Adjust header for collapsed state */
.sidebar.collapsed .company-logo {
    display: none;
    /* Hide logo text and icon when collapsed, show only toggle? Or show icon only? */
}

/* Let's refine: Header has Logo and Toggle. 
   Expanded: [Logo Icon] [Logo Text] ... [Toggle]
   Collapsed: [Toggle] (centered) OR [Logo Icon] (centered) and Toggle moves elsewhere?
   Common pattern: Toggle is always visible.
   Let's try: Header contains Logo. Toggle is separate or part of it.
   Simpler: Toggle button is part of the header.
*/

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    flex: 1;
    overflow-x: hidden;
}

.sidebar.collapsed .nav-links {
    padding: 0 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar.collapsed .nav-link {
    padding: 12px;
    justify-content: center;
}

.nav-link:hover,
.nav-link.active {
    background-color: #eff6ff;
    color: var(--primary-color);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-footer {
    padding: 20px 16px;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.sidebar.collapsed .sidebar-footer {
    padding: 20px 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
    overflow: hidden;
}

.sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 10px 0;
}

.user-profile:hover {
    background-color: var(--bg-color);
}

.user-info {
    flex: 1;
    overflow: hidden;
    transition: opacity 0.2s;
}

.sidebar.collapsed .user-info,
.sidebar.collapsed .user-profile i.fa-chevron-up {
    display: none;
}

.username {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

/* Dropdown Menu (adjusted for sidebar) */
.dropdown-menu {
    position: absolute;
    bottom: 80px;
    /* Above the footer */
    left: 16px;
    width: 218px;
    /* Match sidebar padding width */
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: none;
    z-index: 101;
    padding: 8px 0;
}

.sidebar.collapsed .dropdown-menu {
    left: 80px;
    /* Pop out to the right */
    bottom: 20px;
    width: 200px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    color: var(--text-main);
    font-size: 0.9rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: var(--bg-color);
    color: var(--primary-color);
}

/* Dashboard */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Reduced from 300px to fit smaller screens better */
    gap: 24px;
    margin-bottom: 32px;
}

.col-span-full {
    grid-column: 1 / -1;
}

.stat-card {
    background: var(--surface-color);
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card-highlight {
    background: linear-gradient(135deg, var(--primary-color), #991b1b);
    /* Red 600 to Red 800 */
    color: white;
    border: none;
}

.stat-card-highlight h3,
.stat-card-highlight .stat-label,
.stat-card-highlight .stat-number {
    color: white;
}

.card-header-icon {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header-icon i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.stat-card h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0;
    /* Adjusted for flex header */
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stats-grid-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-number-sm {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    margin: 0;
}

.bg-primary-light {
    background-color: #fee2e2;
}

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

.bg-success-light {
    background-color: #dcfce7;
}

.text-success {
    color: var(--success);
}

.bg-info-light {
    background-color: #dbeafe;
}

.text-info {
    color: var(--info);
}

.bg-warning-light {
    background-color: #fef3c7;
}

.text-warning {
    color: var(--warning);
}

.stat-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background-color: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--success);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.stat-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
}

.mt-2 {
    margin-top: 8px;
}

.chart-select {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 8px;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.chart-select option {
    background: var(--surface-color);
    color: var(--text-main);
}

.chart-select:hover {
    background: #e2e8f0;
}

.card-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
}

.header-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-controls {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.btn-icon.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.chart-summary-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    font-style: italic;
}

/* Filter Bar */
.filter-bar {
    background: var(--surface-color);
    padding: 15px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    border: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.filter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-main);
    background-color: var(--surface-color);
}

.export-buttons {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.btn-export {
    border: none;
    cursor: pointer;
    color: white;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

.btn-export:hover {
    opacity: 0.9;
}

.btn-csv {
    background-color: var(--text-main);
}

.btn-pdf {
    background-color: var(--primary-color);
}

/* Tables & Lists */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.user-table th,
.user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--bg-color);
}

.user-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-muted);
}

.sortable-header {
    cursor: pointer;
}

.sortable-header:hover {
    background-color: #e2e8f0;
}

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

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    width: 200px;
    transition: all 0.2s;
}

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

.view-all-link {
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-list li {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.activity-list li:hover {
    background-color: #f8fafc;
}

.activity-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

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

.empty-state i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.9rem;
}

.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bg-success {
    background-color: #dcfce7;
    color: #166534;
}

.bg-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.bg-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.bg-secondary {
    background-color: #f1f5f9;
    color: #475569;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-md);
    text-align: center;
    margin: 20px;
    /* Ensure spacing on small screens */
    max-height: 90vh;
    /* Prevent overflow */
    overflow-y: auto;
    /* Scrollable if too tall */
}

.modal-lg {
    max-width: 800px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

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

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.modal-ok-btn {
    background-color: var(--danger);
    color: white;
    margin-top: 20px;
    width: 100%;
}

.modal-ok-btn:hover {
    background-color: #dc2626;
}

/* Activity Page */
.activity-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.activity-form-card {
    background: var(--surface-color);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.activity-list-card {
    background: var(--surface-color);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.activity-table th,
.activity-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--bg-color);
}

.activity-table th {
    background-color: var(--bg-color);
    font-weight: 600;
    color: var(--text-muted);
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

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

.card-title {
    margin: 0;
    font-size: 1.1rem;
}

.section-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.modal-ok-btn:hover {
    background-color: #dc2626;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 20px 0;
}

.pagination li button {
    padding: 8px 14px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.9rem;
}

.pagination li button:hover:not(:disabled) {
    background: var(--bg-color);
    border-color: var(--input-border);
}

.pagination li.active button {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination li button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dashboard Utilities */
.text-center {
    text-align: center;
}

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

.stats-summary {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.chart-container {
    height: 250px;
}

.grid-single-col {
    grid-template-columns: 1fr;
    margin-top: 20px;
}

.grid-two-col {
    grid-template-columns: 1fr 1fr;
}

.grid-two-col {
    grid-template-columns: 1fr 1fr;
}

.max-w-600 {
    max-width: 600px;
    margin: 0 auto;
}

.hidden {
    display: none;
}

.input-disabled {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.text-danger {
    color: var(--danger);
}

.btn-gray {
    background-color: #6b7280;
    margin-top: 10px;
}

.btn-gray:hover {
    background-color: #4b5563;
}

.form-.action-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.action-group-right {
    display: flex;
    gap: 12px;
}

.action-buttons .btn-small i {
    margin-right: 6px;
}

.evidence-img {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: block;
    margin: 8px auto;
    /* Center horizontally */
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel {
    flex: 1;
    padding: 10px;
    background: #e5e7eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-main);
}

.btn-cancel:hover {
    background: #d1d5db;
}

.btn-submit {
    flex: 1;
    margin-top: 0;
}

.divider {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid var(--border-color);
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    margin-left: -125px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1;
    left: 50%;
    bottom: 30px;
    font-size: 17px;
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        bottom: 0;
        opacity: 0;
    }

    to {
        bottom: 30px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        bottom: 30px;
        opacity: 1;
    }

    to {
        bottom: 0;
        opacity: 0;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body.with-sidebar {
        padding-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 250px;
        z-index: 1050;
        /* Higher than everything else except modal */
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    /* Overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        /* Just below sidebar */
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* Ensure toggle button is visible on mobile */
    .mobile-toggle-btn {
        display: block;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1030;
        /* Visible above content */
        background: var(--surface-color);
        border: 1px solid var(--border-color);
        padding: 8px 12px;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
        cursor: pointer;
        color: var(--text-main);
    }

    /* Adjust grids */
    .stats-grid,
    .form-row {
        grid-template-columns: 1fr;
        display: grid;
        gap: 20px;
    }

    .form-group {
        width: 100%;
    }

    /* Scrollable Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        width: 100%;
        /* Ensure it doesn't overflow parent */
    }

    .user-table,
    .activity-table {
        min-width: 600px;
        /* Force scroll if too narrow */
        margin-top: 0;
        border: none;
        box-shadow: none;
        font-size: 0.85rem;
    }

    .user-table th,
    .user-table td {
        padding: 10px 8px;
        /* Reduced padding */
        white-space: nowrap;
        /* Prevent wrapping for cleaner scroll */
    }

    .status-badge {
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    /* Adjust header actions */
    .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .export-buttons {
        width: 100%;
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        /* Allow wrapping on very small screens */
    }

    .export-buttons button {
        flex: 1;
        min-width: 120px;
        /* Ensure buttons are clickable */
    }
}

/* Modal Z-Index Fix */
.modal {
    z-index: 1100;
    /* Highest priority */
}