/**
 * Facturaty - Modern Design System
 * Application de facturation pour entreprises marocaines
 * Version 2.0 - UI/UX Moderne
 */

/* ========================================
   CSS VARIABLES - DESIGN TOKENS
======================================== */
:root {
    /* Couleurs principales */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-glow: rgba(37, 99, 235, 0.12);

    /* Couleurs sémantiques */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #06b6d4;
    --info-light: #cffafe;

    /* Backgrounds */
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-sidebar-hover: #334155;
    --bg-input: #f1f5f9;

    /* Textes */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-white: #ffffff;
    --text-sidebar: #cbd5e1;

    /* Bordures & Ombres */
    --border-light: #e2e8f0;
    --border-input: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    --shadow-primary: 0 4px 14px rgba(37, 99, 235, 0.25);

    /* Rayons */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions - DISABLED */
    --transition: none;
    --transition-fast: none;
    --transition-slow: none;

    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --header-height: 70px;
}

/* ========================================
   BASE STYLES
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0;
    line-height: 1.3;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.375rem;
}

h4 {
    font-size: 1.125rem;
}

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

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

/* ========================================
   LAYOUT - SIDEBAR + MAIN
======================================== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.sidebar-logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.sidebar-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: -0.5px;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

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

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

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    margin-bottom: 4px;
    transition: var(--transition-fast);
    position: relative;
}

.nav-item:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--primary);
    color: var(--text-white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 24px;
    background: var(--primary-light);
    border-radius: 0 4px 4px 0;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

.nav-item-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.nav-badge {
    background: var(--primary-light);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    min-width: 22px;
    text-align: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-sidebar-hover);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), #8b5cf6);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 14px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

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

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
    min-height: 100vh;
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* ========================================
   PAGE HEADER
======================================== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    font-size: 1.75rem;
}

.page-title-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-glow);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-title-icon svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.page-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* ========================================
   CARDS
======================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 24px;
}

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    gap: 16px;
}

.card-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin: 0;
}

.card-header-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.card-body {
    padding: 24px;
}

.card-body.p-0 {
    padding: 0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}

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

.stats-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stats-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.stats-icon.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stats-icon.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.stats-icon.warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
}

.stats-icon.info {
    background: linear-gradient(135deg, var(--info), #0891b2);
}

.stats-icon.danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
}

.stats-content {
    flex: 1;
}

.stats-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stats-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stats-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    margin-top: 12px;
}

.stats-link:hover {
    gap: 10px;
}

.stats-link svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   BUTTONS
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(145deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: linear-gradient(145deg, var(--primary-light), var(--primary));
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
    color: white;
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

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

/* Success Button */
.btn-success {
    background: linear-gradient(145deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    color: white;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(145deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
    color: white;
}

/* Info Button */
.btn-info {
    background: linear-gradient(145deg, var(--info), #0891b2);
    color: white;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.25);
}

.btn-info:hover {
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.35);
    color: white;
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(145deg, var(--warning), #d97706);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
    color: white;
}

/* Outline Buttons */
.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-lg svg {
    width: 20px;
    height: 20px;
}

.btn-block {
    width: 100%;
}

/* Button Group */
.btn-group {
    display: inline-flex;
    gap: 8px;
}

.btn-group-sm .btn {
    padding: 6px 10px;
}

/* Icon Button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   FORMS
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 15px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:disabled {
    background: var(--bg-input);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Form Text / Help */
.form-text {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    flex: 1;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-append .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ========================================
   TABLES
======================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: var(--bg-main);
}

.table th {
    padding: 14px 16px;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--primary-glow);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES
======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-info {
    background: var(--info-light);
    color: #0e7490;
}

.badge-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary-glow);
    color: var(--primary-dark);
}

/* ========================================
   ALERTS
======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: var(--info-light);
    color: #0e7490;
    border: 1px solid #a5f3fc;
}

.alert-dismissible {
    padding-right: 48px;
    position: relative;
}

.alert-dismissible .close {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition-fast);
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* ========================================
   LIST GROUP
======================================== */
.list-group {
    display: flex;
    flex-direction: column;
}

.list-group-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: var(--primary-glow);
}

.list-group-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* ========================================
   MODALS
======================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }

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

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

.modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

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

/* ========================================
   DOCUMENT STYLES (Invoices, Quotes, etc.)
======================================== */
.document-container {
    background: var(--bg-card);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.document-header {
    margin-bottom: 30px;
}

.document-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-glow);
}

.document-info {
    background: var(--bg-main);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.document-summary {
    background: var(--bg-main);
    padding: 20px;
    border-radius: var(--radius-md);
}

.amount-in-words {
    font-style: italic;
    padding: 16px;
    background: var(--primary-glow);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    margin: 20px 0;
}

.signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 60px;
    gap: 40px;
}

.signature-block {
    flex: 1;
    text-align: center;
    padding-top: 60px;
    border-top: 1px solid var(--border-light);
}

.company-logo {
    max-height: 80px;
    max-width: 100%;
}

/* ========================================
   LOGIN PAGE
======================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.login-logo-icon svg {
    width: 36px;
    height: 36px;
    color: white;
}

.login-logo h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px;
}

.login-logo p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

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

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

.login-form .btn {
    margin-top: 8px;
}

/* ========================================
   ANIMATIONS
======================================== */
.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.slide-in {
    animation: slideIn 0.4s ease-out;
}

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

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

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Staggered animations for lists */
.stagger-1 {
    animation-delay: 0.05s;
}

.stagger-2 {
    animation-delay: 0.1s;
}

.stagger-3 {
    animation-delay: 0.15s;
}

.stagger-4 {
    animation-delay: 0.2s;
}

.stagger-5 {
    animation-delay: 0.25s;
}

/* ========================================
   UTILITIES
======================================== */
.text-center {
    text-align: center;
}

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

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

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

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

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

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

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

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

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.mb-4 {
    margin-bottom: 32px;
}

.mt-0 {
    margin-top: 0;
}

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

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

.mt-3 {
    margin-top: 24px;
}

.mt-4 {
    margin-top: 32px;
}

.mr-2 {
    margin-right: 16px;
}

.ml-2 {
    margin-left: 16px;
}

.my-2 {
    margin-top: 16px;
    margin-bottom: 16px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-0 {
    padding: 0;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

.p-4 {
    padding: 32px;
}

.d-flex {
    display: flex;
}

.d-block {
    display: block;
}

.d-inline-flex {
    display: inline-flex;
}

.d-none {
    display: none;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-2 {
    gap: 16px;
}

.gap-3 {
    gap: 24px;
}

.w-100 {
    width: 100%;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col-md-2,
.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
    padding: 0 12px;
    width: 100%;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (min-width: 768px) {
    .col-md-2 {
        width: 16.666667%;
    }

    .col-md-3 {
        width: 25%;
    }

    .col-md-4 {
        width: 33.333333%;
    }

    .col-md-6 {
        width: 50%;
    }

    .col-md-8 {
        width: 66.666667%;
    }

    .col-md-12 {
        width: 100%;
    }
}

@media (max-width: 991px) {
    :root {
        --sidebar-width: 260px;
    }

    .main-content {
        padding: 24px;
    }
}

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

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

    .mobile-menu-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
        padding: 80px 16px 24px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
    }

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

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .signatures {
        flex-direction: column;
    }

    .signature-block {
        width: 100%;
        margin-bottom: 32px;
    }

    .document-container {
        padding: 20px;
    }

    .login-form {
        padding: 24px;
    }

    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-md-8 {
        width: 100%;
        margin-bottom: 16px;
    }
}

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

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

/* ========================================
   PRINT STYLES
======================================== */
@media print {

    .sidebar,
    .mobile-menu-toggle,
    .no-print,
    .page-actions {
        display: none !important;
    }

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

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .document-container {
        box-shadow: none;
        padding: 0;
    }

    body {
        background: white;
    }
}

/* ========================================
   DROPDOWN (for forms)
======================================== */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.dropdown-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

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

.dropdown-item svg {
    width: 18px;
    height: 18px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

/* Definition Lists (for details pages) */
dl.row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0;
}

dl.row dt {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 14px;
}

dl.row dd {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.col-sm-4 {
    width: 33.333%;
    padding: 0 12px;
}

.col-sm-8 {
    width: 66.666%;
    padding: 0 12px;
}

@media (max-width: 576px) {

    .col-sm-4,
    .col-sm-8 {
        width: 100%;
    }

    dl.row dt {
        margin-bottom: 4px;
    }
}

/* ========================================
   MODAL OVERLAY (Product Search, etc.)
======================================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.modal-overlay .modal {
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }

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

.modal-overlay .modal-header {
    background: var(--bg-main);
}

.modal-overlay .modal-body {
    max-height: 60vh;
    overflow-y: auto;
}

/* ========================================
   SEARCH RESULTS (for Product Search)
======================================== */
.search-results {
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.search-result-item {
    display: block;
    padding: 16px;
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    border-color: var(--primary);
    background: var(--primary-glow);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}

.search-result-item:last-child {
    margin-bottom: 0;
}

.search-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.search-result-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.search-result-price {
    font-weight: 700;
    font-size: 16px;
    color: var(--success);
}

.search-result-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

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

.no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results p {
    margin: 0;
}

/* ========================================
   DELETE / REMOVE BUTTON
======================================== */
.action-btn.delete,
.btn-delete,
.remove-row {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn.delete:hover,
.btn-delete:hover,
.remove-row:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.action-btn.delete:active,
.btn-delete:active,
.remove-row:active {
    transform: scale(0.95);
}

.action-btn.delete svg,
.btn-delete svg,
.remove-row svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Actions column centered */
.table td.actions-column,
.table td:last-child:has(.remove-row) {
    text-align: center;
    vertical-align: middle;
}

/* Form Rows for items */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* Item row inputs */
.item-row input.form-control-sm {
    padding: 8px 12px;
    font-size: 14px;
}

.item-row .item-total {
    font-weight: 600;
    color: var(--text-primary);
}

/* Bootstrap compatibility for old pages */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 24px;
}

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

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 24px;
}

.pb-0 {
    padding-bottom: 0;
}

.p-0 {
    padding: 0;
}

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

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

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

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

.font-weight-bold {
    font-weight: 700;
}

/* Grid columns */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -12px;
}

.col-md-4 {
    width: 33.333%;
    padding: 0 12px;
}

.col-md-6 {
    width: 50%;
    padding: 0 12px;
}

.col-md-8 {
    width: 66.666%;
    padding: 0 12px;
}

.col-md-12 {
    width: 100%;
    padding: 0 12px;
}

@media (max-width: 768px) {

    .col-md-4,
    .col-md-6,
    .col-md-8 {
        width: 100%;
    }
}

/* Card footer */
.card-footer {
    padding: 20px 24px;
    background: var(--bg-main);
    border-top: 1px solid var(--border-light);
}

/* Page Header old style */
h1.page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    margin-bottom: 24px;
}

h1.page-header i,
h1.page-header svg {
    color: var(--primary);
}

/* Input group append */
.input-group-append {
    display: flex;
}

.input-group-prepend {
    display: flex;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--text-muted);
}

.input-group .form-control {
    border-radius: 0;
}

.input-group .form-control:first-child {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child,
.input-group .btn:last-child {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-prepend+.form-control {
    border-left: none;
}

/* ========================================
   DISABLE ALL HOVER EFFECTS
======================================== */
/* Remove all hover transformations and animations */
*:hover {
    transform: none !important;
}

/* Cards - no hover effect */
.card:hover,
.stats-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

/* Buttons - no hover effect */
.btn:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-success:hover,
.btn-danger:hover,
.btn-info:hover,
.btn-warning:hover,
.btn-outline-primary:hover {
    transform: none !important;
}

/* Navigation - keep functional hover for visibility */
.nav-item:hover {
    transform: none !important;
}

/* Table rows - no hover effect */
.table-hover tbody tr:hover {
    background-color: transparent !important;
}

/* Links - keep color change but no animation */
a:hover {
    transform: none !important;
}

/* Stats link - no gap change */
.stats-link:hover {
    gap: 6px !important;
}

/* ========================================
   DISABLE ALL ANIMATIONS & TRANSITIONS
======================================== */
/* Global reset for all animations and transitions */
*,
*::before,
*::after {
    animation: none !important;
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition: none !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

/* Remove fade-in class effect */
.fade-in,
.slide-in {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
}

/* Remove loading spinners animation */
.spinner,
.loading,
.loader {
    animation: none !important;
}

/* ========================================
   BILYAN LOGO STYLING
======================================== */
/* Logo highlight - YAN in blue tech */
.logo-highlight {
    color: var(--primary) !important;
    font-weight: 700;
}

/* Sidebar logo text - BIL in white */
.sidebar-logo-text {
    color: var(--text-white);
    font-weight: 700;
}

.sidebar-logo-text .logo-highlight {
    color: var(--primary-light) !important;
}

/* Login page title */
.login-title {
    color: var(--text-primary);
    font-weight: 700;
    margin: 0;
}

.login-title .logo-highlight {
    color: var(--primary) !important;
}