/*
 * Auditor - Custom Styles
 * Theme Colors: Molten Lava, Brick Red, Papaya Whip, Deep Space Blue, Steel Blue
 */

/* ==========================================
   CSS Custom Properties (Theme Variables)
   ========================================== */
:root {
    /* Primary Theme Colors */
    --molten-lava: #780000;
    --brick-red: #c1121f;
    --papaya-whip: #fdf0d5;
    --deep-space-blue: #003049;
    --steel-blue: #669bbc;

    /* Derived Colors */
    --primary: var(--brick-red);
    --primary-hover: var(--molten-lava);
    --secondary: var(--steel-blue);
    --secondary-hover: #5a8aa8;
    --dark: var(--deep-space-blue);
    --light: var(--papaya-whip);
    --accent: var(--molten-lava);

    /* Neutral Colors */
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;

    /* Status Colors */
    --success: #198754;
    --warning: #ffc107;
    --danger: var(--brick-red);
    --info: var(--steel-blue);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 48, 73, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 48, 73, 0.1);
    --shadow-lg: 0 1rem 3rem rgba(0, 48, 73, 0.15);
    --shadow-glow: 0 0 20px rgba(102, 155, 188, 0.3);

    /* Borders */
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--papaya-whip);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* Links */
a {
    color: var(--steel-blue);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--deep-space-blue);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

/* ==========================================
   Utility Classes
   ========================================== */
.text-primary {
    color: var(--primary) !important;
}

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

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

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

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

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-dark {
    background-color: var(--dark) !important;
}

.bg-light {
    background-color: var(--light) !important;
}

.bg-accent {
    background-color: var(--accent) !important;
}

/* ==========================================
   Button Styles
   ========================================== */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: var(--border-radius);
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(193, 18, 31, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--molten-lava) 0%, #5a0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 18, 31, 0.4);
    color: var(--white);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--steel-blue) 0%, #5a8aa8 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(102, 155, 188, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a8aa8 0%, var(--deep-space-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 155, 188, 0.4);
    color: var(--white);
}

.btn-dark {
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 48, 73, 0.3);
}

.btn-dark:hover {
    background: linear-gradient(135deg, #001f2d 0%, #000d14 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 48, 73, 0.4);
    color: var(--white);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--brick-red);
    color: var(--brick-red);
}

.btn-outline-primary:hover {
    background: var(--brick-red);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline-secondary {
    background: transparent;
    border: 2px solid var(--steel-blue);
    color: var(--steel-blue);
}

.btn-outline-secondary:hover {
    background: var(--steel-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.1rem;
}

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

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* ==========================================
   Card Styles (Glassmorphism)
   ========================================== */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    color: var(--white);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    padding: 1rem 1.5rem;
    border: none;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: rgba(253, 240, 213, 0.5);
    border-top: 1px solid rgba(0, 48, 73, 0.1);
    padding: 1rem 1.5rem;
}

/* Stats Card */
.stats-card {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--brick-red) 0%, var(--molten-lava) 100%);
}

.stats-card.primary::before {
    background: linear-gradient(180deg, var(--brick-red) 0%, var(--molten-lava) 100%);
}

.stats-card.secondary::before {
    background: linear-gradient(180deg, var(--steel-blue) 0%, var(--deep-space-blue) 100%);
}

.stats-card.success::before {
    background: linear-gradient(180deg, #20c997 0%, #198754 100%);
}

.stats-card.warning::before {
    background: linear-gradient(180deg, #ffc107 0%, #fd7e14 100%);
}

.stats-card .stats-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-card .stats-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--deep-space-blue);
}

.stats-card .stats-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================
   Form Styles
   ========================================== */
.form-control {
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all var(--transition-fast);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--steel-blue);
    box-shadow: 0 0 0 3px rgba(102, 155, 188, 0.2);
    outline: none;
}

.form-control.is-invalid:focus {
    border-color: var(--brick-red);
    box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.2);
}

.form-label {
    font-weight: 500;
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.form-check-input:checked {
    background-color: var(--brick-red);
    border-color: var(--brick-red);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.2);
}

/* Input Group */
.input-group .input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-300);
    color: var(--gray-600);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control {
    border: 2px solid var(--gray-300);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-group .form-control:focus {
    border-color: var(--steel-blue);
    z-index: 1;
}

.input-group:focus-within .input-group-text {
    border-color: var(--steel-blue);
}

/* Input group with button at end */
.input-group .btn {
    border: 2px solid var(--gray-300);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-group .form-control:not(:last-child) {
    border-radius: 0;
}

.input-group .input-group-text:first-child+.form-control {
    border-left: none;
}

/* ==========================================
   Sidebar Styles
   ========================================== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--deep-space-blue) 0%, #001f2d 100%);
    color: var(--white);
    z-index: 1000;
    transition: all var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--steel-blue);
    border-radius: 3px;
}

.sidebar-brand {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .logo {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.sidebar-brand .brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu-title {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--steel-blue);
    font-weight: 600;
}

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

.sidebar-nav-item {
    margin: 0.25rem 0.75rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(5px);
}

.sidebar-nav-link.active {
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(193, 18, 31, 0.3);
}

.sidebar-nav-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.sidebar-badge {
    margin-left: auto;
    background: var(--brick-red);
    color: var(--white);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-weight: 600;
}

/* Sidebar Collapsed State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .sidebar-menu-title,
.sidebar.collapsed .sidebar-nav-link span,
.sidebar.collapsed .sidebar-badge {
    display: none;
}

.sidebar.collapsed .sidebar-nav-link {
    justify-content: center;
    padding: 0.875rem;
}

/* ==========================================
   Main Content Area
   ========================================== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left var(--transition);
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Header */
.main-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--deep-space-blue);
}

.sidebar-toggle:hover {
    background: var(--steel-blue);
    color: var(--white);
}

.breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--steel-blue);
}

.breadcrumb-item.active {
    color: var(--deep-space-blue);
    font-weight: 500;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Box */
.header-search {
    position: relative;
}

.header-search input {
    width: 300px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: var(--gray-100);
    transition: all var(--transition-fast);
}

.header-search input:focus {
    width: 350px;
    border-color: var(--steel-blue);
    background: var(--white);
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

/* Notification Bell */
.notification-bell {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--deep-space-blue);
}

.notification-bell:hover {
    background: var(--steel-blue);
    color: var(--white);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--brick-red);
    color: var(--white);
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* User Dropdown */
.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--gray-200);
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.user-dropdown .dropdown-toggle:hover {
    background: var(--gray-300);
}

.user-dropdown .dropdown-toggle::after {
    display: none;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--steel-blue) 0%, var(--deep-space-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
}

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

.user-name {
    font-weight: 600;
    color: var(--deep-space-blue);
    font-size: 0.875rem;
    padding-right: 0.75rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Content Area */
.content-wrapper {
    padding: 2rem;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* ==========================================
   File Upload Zone
   ========================================== */
.upload-zone {
    border: 3px dashed var(--steel-blue);
    border-radius: var(--border-radius-xl);
    padding: 3rem;
    text-align: center;
    background: rgba(102, 155, 188, 0.05);
    transition: all var(--transition);
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--brick-red);
    background: rgba(193, 18, 31, 0.05);
    transform: scale(1.02);
}

.upload-zone .upload-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--steel-blue) 0%, var(--deep-space-blue) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
}

.upload-zone:hover .upload-icon {
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.upload-zone h4 {
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

.upload-zone p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.file-preview:hover {
    box-shadow: var(--shadow);
}

.file-preview .file-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.file-preview .file-icon.pdf {
    background: rgba(193, 18, 31, 0.1);
    color: var(--brick-red);
}

.file-preview .file-icon.image {
    background: rgba(102, 155, 188, 0.1);
    color: var(--steel-blue);
}

.file-preview .file-icon.excel {
    background: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.file-preview .file-info {
    flex: 1;
}

.file-preview .file-name {
    font-weight: 600;
    color: var(--deep-space-blue);
}

.file-preview .file-size {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.file-preview .file-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(193, 18, 31, 0.1);
    color: var(--brick-red);
    border-radius: 50%;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-preview .file-remove:hover {
    background: var(--brick-red);
    color: var(--white);
}

/* Upload Progress */
.upload-progress {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.upload-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--steel-blue) 0%, var(--deep-space-blue) 100%);
    border-radius: 3px;
    transition: width var(--transition);
}

/* ==========================================
   Document Type Selector
   ========================================== */
.doc-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.doc-type-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.doc-type-card:hover {
    border-color: var(--steel-blue);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.doc-type-card.selected {
    border-color: var(--brick-red);
    background: rgba(193, 18, 31, 0.05);
    box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.2);
}

.doc-type-card .doc-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.doc-type-card.purchase-order .doc-icon {
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    color: var(--white);
}

.doc-type-card.invoice .doc-icon {
    background: linear-gradient(135deg, var(--steel-blue) 0%, var(--deep-space-blue) 100%);
    color: var(--white);
}

.doc-type-card.bank-statement .doc-icon {
    background: linear-gradient(135deg, #20c997 0%, #198754 100%);
    color: var(--white);
}

.doc-type-card h5 {
    margin-bottom: 0.25rem;
    color: var(--deep-space-blue);
}

.doc-type-card p {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

/* ==========================================
   Data Table Styles
   ========================================== */
.data-table {
    width: 100%;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table thead {
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    color: var(--white);
}

.data-table thead th {
    padding: 1rem 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    border: none;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--transition-fast);
}

.data-table tbody tr:hover {
    background: rgba(102, 155, 188, 0.05);
}

.data-table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
}

.data-table .table-actions {
    display: flex;
    gap: 0.5rem;
}

.data-table .table-actions .btn {
    padding: 0.375rem 0.625rem;
}

/* ==========================================
   Status Badges
   ========================================== */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #997404;
}

.badge-processing {
    background: rgba(102, 155, 188, 0.15);
    color: var(--steel-blue);
}

.badge-completed,
.badge-success {
    background: rgba(25, 135, 84, 0.15);
    color: var(--success);
}

.badge-error,
.badge-failed {
    background: rgba(193, 18, 31, 0.15);
    color: var(--brick-red);
}

/* ==========================================
   Auth Layout Styles
   ========================================== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
}

.auth-brand-side {
    width: 50%;
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.auth-brand-side::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23669bbc' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.auth-brand-logo {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(193, 18, 31, 0.4);
}

.auth-brand-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.auth-brand-subtitle {
    font-size: 1.125rem;
    color: var(--steel-blue);
    max-width: 400px;
}

.auth-features {
    margin-top: 3rem;
    text-align: left;
    max-width: 350px;
}

.auth-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-feature-icon {
    width: 40px;
    height: 40px;
    background: rgba(102, 155, 188, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--steel-blue);
    flex-shrink: 0;
}

.auth-feature-text h6 {
    color: var(--white);
    margin-bottom: 0.25rem;
}

.auth-feature-text p {
    font-size: 0.875rem;
    color: var(--steel-blue);
    margin: 0;
}

.auth-form-side {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: var(--papaya-whip);
}

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

.auth-form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

.auth-form-subtitle {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-300);
}

.auth-divider span {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-600);
}

.auth-footer a {
    color: var(--brick-red);
    font-weight: 600;
}

/* ==========================================
   Toast Notifications
   ========================================== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

@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(--brick-red);
}

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

.toast-info {
    border-left: 4px solid var(--steel-blue);
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-success .toast-icon {
    background: rgba(25, 135, 84, 0.1);
    color: var(--success);
}

.toast-error .toast-icon {
    background: rgba(193, 18, 31, 0.1);
    color: var(--brick-red);
}

.toast-warning .toast-icon {
    background: rgba(255, 193, 7, 0.1);
    color: #997404;
}

.toast-info .toast-icon {
    background: rgba(102, 155, 188, 0.1);
    color: var(--steel-blue);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--deep-space-blue);
}

.toast-message {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: rgba(102, 155, 188, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--steel-blue);
}

.empty-state h4 {
    color: var(--deep-space-blue);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* ==========================================
   Responsive Styles
   ========================================== */
@media (max-width: 1200px) {
    .header-search input {
        width: 200px;
    }

    .header-search input:focus {
        width: 250px;
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .main-content {
        margin-left: 0;
    }

    .auth-wrapper {
        flex-direction: column;
    }

    .auth-brand-side {
        width: 100%;
        padding: 2rem;
        min-height: auto;
    }

    .auth-features {
        display: none;
    }

    .auth-form-side {
        width: 100%;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .header-search {
        display: none;
    }

    .user-info {
        display: none;
    }

    .content-wrapper {
        padding: 1rem;
    }

    .doc-type-selector {
        grid-template-columns: 1fr;
    }

    .stats-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 576px) {
    .main-header {
        padding: 1rem;
    }

    .page-title {
        font-size: 1.25rem;
    }

    .upload-zone {
        padding: 2rem 1rem;
    }

    .upload-zone .upload-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

.fade-in-up {
    animation: fadeInUp 0.4s ease;
}

.spin {
    animation: spin 1s linear infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--brick-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ==========================================
   Modal Customizations
   ========================================== */
.modal-content {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    color: var(--white);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
}

/* ==========================================
   Profile Page Styles
   ========================================== */
.profile-header {
    background: linear-gradient(135deg, var(--deep-space-blue) 0%, #001f2d 100%);
    padding: 3rem 2rem;
    text-align: center;
    border-radius: var(--border-radius-lg);
    color: var(--white);
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brick-red) 0%, var(--molten-lava) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    font-weight: 700;
    border: 4px solid rgba(255, 255, 255, 0.3);
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.profile-email {
    color: var(--steel-blue);
}

/* ==========================================
   Settings Tabs
   ========================================== */
.settings-tabs {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.settings-tabs .nav-link {
    color: var(--gray-700);
    padding: 1rem 1.5rem;
    border: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.settings-tabs .nav-link:hover {
    color: var(--deep-space-blue);
    background: rgba(102, 155, 188, 0.05);
}

.settings-tabs .nav-link.active {
    color: var(--brick-red);
    border-bottom-color: var(--brick-red);
    background: rgba(193, 18, 31, 0.05);
}

.settings-content {
    padding: 2rem;
}