/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0F4C81;
    --primary-dark: #0B3A61;
    --secondary: #2F80ED;
    --success: #1F9D55;
    --warning: #D9822B;
    --danger: #D64545;
    --info: #5AC8FA;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F4F7FB;
    --bg-tertiary: #E2E8F0;
    --surface: #FFFFFF;
    --card-tint: #EEF5FF;
    --chip-bg: #E2E8F0;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #64748B;
    
    --border-color: #D9E2EC;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
    
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

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

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

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-screen p {
    margin-top: var(--spacing-md);
    color: var(--text-secondary);
}

/* Screen Container */
.screen {
    min-height: 100vh;
}

/* Auth Screens */
.auth-container {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.auth-header .logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.auth-header .logo img {
    width: auto;
    height: auto;
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

/* Input styling is centralized in forms.css */

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    min-height: 48px;
    padding: var(--spacing-md) var(--spacing-lg);
}

.auth-card .btn-primary,
.form-actions > .btn-primary:only-child {
    width: 100%;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: auto;
}

.btn-icon {
    background: none;
    border: none;
    padding: var(--spacing-sm);
    cursor: pointer;
    color: var(--text-primary);
    font-size: 20px;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

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

/* Error Banner */
.error-banner {
    background: #FFE5E5;
    border: 1px solid var(--danger);
    color: var(--danger);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
}

.success-banner {
    background: #E8F8EF;
    border: 1px solid var(--success);
    color: #1B6B3F;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-md);
    font-size: 14px;
}

/* Persist Note */
.persist-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: var(--spacing-md);
}

/* Signup Row */
.signup-row {
    text-align: center;
    margin-top: var(--spacing-md);
    font-size: 14px;
}

.signup-row span {
    color: var(--text-secondary);
}

.signup-row a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.signup-row a:hover {
    text-decoration: underline;
}

/* App Header */
.app-header {
    background: var(--primary);
    color: white;
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex: 1;
    min-width: 0;
}

.app-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.site-name {
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.header-left .btn-icon {
    color: white;
    flex-shrink: 0;
}

.header-left .btn-icon:hover {
    background: rgba(255, 255, 255, 0.2);
}

.header-left .btn-icon.is-hidden {
    visibility: hidden;
    pointer-events: none;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

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

.sidebar-header {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--bg-tertiary);
    flex-shrink: 0;
}

.sidebar-header-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    min-width: 0;
    flex: 1;
}

.sidebar-header .logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-header .logo.sidebar-fleet-logo {
    background: transparent;
    padding: 0;
}

.sidebar-header .logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.sidebar-header span {
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-app-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.3;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.sidebar-user-name {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-role {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.sidebar-nav {
    padding: var(--spacing-md);
    flex: 1;
    overflow-y: auto;
}

.sidebar-footer {
    border-top: 1px solid var(--bg-tertiary);
    padding: var(--spacing-md);
    flex-shrink: 0;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: background 0.2s;
}

.sidebar-footer-link:hover {
    background: var(--bg-secondary);
}

.sidebar-footer-link i {
    width: 20px;
    text-align: center;
}

.nav-section {
    margin-bottom: var(--spacing-lg);
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: var(--spacing-sm) var(--spacing-md);
    margin-bottom: var(--spacing-xs);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
    margin-bottom: var(--spacing-xs);
}

.nav-item:hover {
    background: var(--bg-secondary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    padding: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
}
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: var(--spacing-xs);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    min-height: 92px;
}

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .icon.primary {
    background: rgba(0, 122, 255, 0.1);
    color: var(--primary);
}

.stat-card .icon.success {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.stat-card .icon.warning {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

.stat-card .icon.danger {
    background: rgba(255, 59, 48, 0.1);
    color: var(--danger);
}

.stat-card .content {
    flex: 1;
    min-width: 0;
}

.stat-card .value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.25;
    min-height: 2.5em;
}

.stat-card-danger {
    border: 1px solid rgba(255, 59, 48, 0.25);
    background: rgba(255, 59, 48, 0.06);
}

.stat-card-danger h4,
.stat-card-danger p {
    color: var(--danger);
}

.salary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.salary-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    color: var(--text-secondary);
}

.salary-breakdown-row strong {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.salary-breakdown-total {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-tertiary);
    color: var(--text-primary);
}

.salary-breakdown-total strong {
    color: var(--primary);
    font-size: 18px;
}

.salary-breakdown-danger strong {
    color: var(--danger);
}

.salary-breakdown-reference {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--bg-tertiary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.business-logo-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--bg-tertiary);
}

.business-logo-preview-wrap {
    display: flex;
    justify-content: center;
    margin: 16px 0 20px;
}

.business-logo-preview {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    object-fit: contain;
    border: 1px solid var(--bg-tertiary);
    background: var(--bg-secondary);
}

.business-logo-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
}

/* Module Grid */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.module-card {
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.module-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.module-card i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.module-card span {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

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

th, td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--bg-tertiary);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

td {
    font-size: 14px;
    color: var(--text-primary);
}

tr:hover td {
    background: var(--bg-secondary);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.badge.active {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.badge.inactive {
    background: rgba(110, 110, 110, 0.1);
    color: var(--text-secondary);
}

.badge.completed {
    background: rgba(52, 199, 89, 0.1);
    color: var(--success);
}

.badge.idle {
    background: rgba(255, 149, 0, 0.12);
    color: var(--warning);
}

.badge.draft {
    background: rgba(255, 149, 0, 0.1);
    color: var(--warning);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

/* App Footer */
.app-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--bg-tertiary);
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
.app-footer.hidden {
    display: none !important;
}

.app-footer .footer-meta {
    margin-bottom: 4px;
}

.app-footer .powered-by {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

.app-footer .powered-by a {
    color: var(--primary);
    text-decoration: none;
}

.app-footer .powered-by a:hover {
    text-decoration: underline;
}

.powered-by-auth {
    margin-top: var(--spacing-lg);
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.powered-by-auth a {
    color: var(--primary);
    text-decoration: none;
}

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

.toast {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.warning {
    border-left: 4px solid var(--warning);
}

.toast-title {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.toast-message {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Modal */
.modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.empty-state p {
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .auth-container {
        padding: var(--spacing-md);
    }
    
    .auth-card {
        padding: var(--spacing-md);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    .sidebar {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .auth-header .logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .module-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: var(--spacing-md);
    }
    
    .stat-card {
        padding: var(--spacing-md);
    }
    
    .stat-card .value {
        font-size: 20px;
    }
}

/* Overlay for sidebar */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 140;
    display: none;
}

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

/* Form Actions */
.form-actions {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.form-actions .btn {
    flex: 1;
}

/* Filters */
.accordion {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 16px;
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.accordion-header span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.accordion-chevron {
    transition: transform 0.2s ease;
    color: var(--text-muted);
}

.accordion-chevron.is-open {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.dashboard-filters-accordion .dashboard-filters {
    margin-bottom: 0;
    padding: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.filter-group {
    flex: 1;
    min-width: 150px;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
}

.pagination button {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.pagination button:hover {
    background: var(--bg-secondary);
}

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

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

.alert-intro-card {
    margin-bottom: 18px;
}
.alert-intro-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--text);
}
.alert-intro-text {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.45;
}
.alert-intro-count {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}
.alert-accordion-list {
    display: grid;
    gap: 12px;
}
.alert-accordion {
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.alert-accordion-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
}
.alert-accordion-left,
.alert-accordion-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.alert-accordion-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
}
.alert-accordion-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.alert-accordion-chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    margin-top: -4px;
}
.alert-accordion.is-open .alert-accordion-chevron {
    transform: rotate(225deg);
    margin-top: 4px;
}
.alert-category-count {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.alert-accordion-body {
    padding: 0 12px 12px;
}
.alert-accordion-body[hidden] {
    display: none;
}
.alert-category-cards {
    display: grid;
    gap: 8px;
}
.alert-item-card {
    margin: 0;
    cursor: pointer;
    border: 1px solid transparent;
    border-left-width: 4px;
    border-left-style: solid;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.alert-item-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}
.alert-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.alert-card { margin-bottom: 12px; cursor: pointer; }
.alert-unread { border-left: 4px solid var(--warning); background: #fff8ef; }
.alert-title {
    font-weight: 700;
    margin: 0;
    font-size: 15px;
    line-height: 1.35;
    color: var(--text);
}
.alert-meta {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}
.alert-msg {
    color: var(--text-secondary);
    margin: 8px 0 0;
    line-height: 1.45;
    font-size: 14px;
}
.alert-sev-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.alert-sev-danger {
    background: #fee2e2;
    color: #b91c1c;
}
.alert-sev-warning {
    background: #ffedd5;
    color: #c2410c;
}
.alert-sev-info {
    background: #e0f2fe;
    color: #0369a1;
}

/* Category accents */
.alert-accent-teal .alert-accordion-toggle { background: #f0fdfa; color: #0f766e; }
.alert-accent-teal .alert-category-count { background: #ccfbf1; color: #0f766e; }
.alert-accent-teal .alert-item-card { border-left-color: #14b8a6; }
.alert-accent-teal .alert-item-even { background: #f0fdfa; }
.alert-accent-teal .alert-item-odd { background: #fff; }

.alert-accent-amber .alert-accordion-toggle { background: #fffbeb; color: #b45309; }
.alert-accent-amber .alert-category-count { background: #fde68a; color: #92400e; }
.alert-accent-amber .alert-item-card { border-left-color: #f59e0b; }
.alert-accent-amber .alert-item-even { background: #fffbeb; }
.alert-accent-amber .alert-item-odd { background: #fff; }

.alert-accent-indigo .alert-accordion-toggle { background: #eef2ff; color: #4338ca; }
.alert-accent-indigo .alert-category-count { background: #c7d2fe; color: #3730a3; }
.alert-accent-indigo .alert-item-card { border-left-color: #6366f1; }
.alert-accent-indigo .alert-item-even { background: #eef2ff; }
.alert-accent-indigo .alert-item-odd { background: #fff; }

.alert-accent-green .alert-accordion-toggle { background: #f0fdf4; color: #15803d; }
.alert-accent-green .alert-category-count { background: #bbf7d0; color: #166534; }
.alert-accent-green .alert-item-card { border-left-color: #22c55e; }
.alert-accent-green .alert-item-even { background: #f0fdf4; }
.alert-accent-green .alert-item-odd { background: #fff; }

.alert-accent-blue .alert-accordion-toggle { background: #eff6ff; color: #1d4ed8; }
.alert-accent-blue .alert-category-count { background: #bfdbfe; color: #1e40af; }
.alert-accent-blue .alert-item-card { border-left-color: #3b82f6; }
.alert-accent-blue .alert-item-even { background: #eff6ff; }
.alert-accent-blue .alert-item-odd { background: #fff; }

.alert-accent-rose .alert-accordion-toggle { background: #fff1f2; color: #be123c; }
.alert-accent-rose .alert-category-count { background: #fecdd3; color: #9f1239; }
.alert-accent-rose .alert-item-card { border-left-color: #f43f5e; }
.alert-accent-rose .alert-item-even { background: #fff1f2; }
.alert-accent-rose .alert-item-odd { background: #fff; }

.alert-accent-slate .alert-accordion-toggle { background: #f8fafc; color: #334155; }
.alert-accent-slate .alert-category-count { background: #e2e8f0; color: #334155; }
.alert-accent-slate .alert-item-card { border-left-color: #64748b; }
.alert-accent-slate .alert-item-even { background: #f8fafc; }
.alert-accent-slate .alert-item-odd { background: #fff; }

.alert-card-actions {
    margin-top: 10px;
}
.dashboard-alerts-panel {
    margin-bottom: 18px;
    display: grid;
    gap: 12px;
}
.alert-banner { margin-bottom: 16px; }
.form-grid { display: grid; gap: 12px; }

.doc-upload-group { display: grid; gap: 8px; }
.doc-preview-wrap { display: grid; gap: 8px; margin-bottom: 8px; }
.doc-preview-thumb {
    width: 100%;
    max-width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--bg-secondary);
}
.doc-preview-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}
.doc-file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text);
    font-size: 14px;
}
.doc-preview-full {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    background: var(--bg-secondary);
}
.doc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.field-hint, .file-upload-label {
    color: var(--text-muted);
    font-size: 12px;
}
.file-upload-label { font-weight: 600; margin-top: 4px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

.help-section-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.help-section-toggle span {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.help-section-toggle small {
    color: var(--text-secondary);
    font-size: 13px;
}

.help-section-body {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.help-contact-row {
    margin-bottom: 12px;
}

.help-contact-row strong {
    display: block;
    margin-bottom: 4px;
}

.help-contact-row p {
    margin: 0;
    color: var(--text-secondary);
}

.business-autocomplete-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.business-autocomplete-input {
    flex: 1;
}

.business-autocomplete-dropdown {
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    max-height: 220px;
    overflow-y: auto;
}

.business-autocomplete-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.business-autocomplete-option:hover {
    background: var(--bg-secondary);
}

.business-scope-banner {
    margin-bottom: 16px;
    padding: 12px 16px;
    border-left: 4px solid var(--primary);
    background: var(--bg-secondary);
}

.uploads-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.uploads-gallery-card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface);
    cursor: pointer;
    position: relative;
}

.uploads-gallery-card.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

.uploads-gallery-card input {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
}

.uploads-gallery-thumb {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    background: var(--bg-secondary);
}

.uploads-gallery-file {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.uploads-gallery-meta {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.uploads-gallery-url {
    word-break: break-all;
    font-size: 0.75rem;
}
