/* ===== Accura Accounts - Professional Glass Theme ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --primary: #2563eb;
    --primary-light: rgba(37, 99, 235, 0.12);
    --primary-glow: rgba(37, 99, 235, 0.22);
    --bg-dark: #eef4ff;
    --bg-surface: #f8fbff;
    --bg-card: rgba(255, 255, 255, 0.72);
    --bg-card-hover: rgba(255, 255, 255, 0.92);
    --glass: rgba(255, 255, 255, 0.62);
    --glass-border: rgba(37, 99, 235, 0.14);
    --glass-strong: rgba(255, 255, 255, 0.82);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --success: #16a34a;
    --success-glow: rgba(22, 163, 74, 0.18);
    --danger: #dc2626;
    --danger-glow: rgba(220, 38, 38, 0.18);
    --warning: #d97706;
    --warning-glow: rgba(217, 119, 6, 0.18);
    --info: #3b82f6;
    --info-glow: rgba(59, 130, 246, 0.18);
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 24px;
    --shadow: 0 8px 32px rgba(37, 99, 235, 0.10);
    --shadow-lg: 0 20px 60px rgba(37, 99, 235, 0.14);
    --shadow-glow: 0 0 40px var(--primary-glow);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: linear-gradient(135deg, #e0e7ff 0%, #f8fbff 35%, #e0f2fe 68%, #f5f3ff 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background gradient - uses company color */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 20% 10%, rgba(37, 99, 235, 0.18) 0%, transparent 42%),
                radial-gradient(ellipse at 80% 85%, rgba(96, 165, 250, 0.16) 0%, transparent 45%),
                radial-gradient(ellipse at 50% 50%, rgba(196, 181, 253, 0.14) 0%, transparent 60%);
    opacity: 0.9;
    z-index: -1;
    animation: bgFloat 25s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, rgba(37, 99, 235, 0.06) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
    z-index: -1;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-1.5%, -1%) rotate(0.5deg); }
    66% { transform: translate(1%, -2%) rotate(-0.5deg); }
}

/* ===== Glass Components ===== */
.glass {
    background: var(--glass);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
}

.glass-strong {
    background: var(--glass-strong);
    backdrop-filter: blur(40px) saturate(1.4);
    -webkit-backdrop-filter: blur(40px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px) saturate(1.25);
    -webkit-backdrop-filter: blur(24px) saturate(1.25);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow);
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: var(--transition);
}

.glass-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(37, 99, 235, 0.22);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.glass-card:hover::before {
    opacity: 1;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; font-weight: 900; }
h2 { font-size: 2rem; font-weight: 800; }
h3 { font-size: 1.5rem; font-weight: 800; }
h4 { font-size: 1.25rem; font-weight: 700; }
h5 { font-size: 1.1rem; font-weight: 700; }
h6 { font-size: 0.95rem; font-weight: 700; }

.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 45%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.text-bold { font-weight: 800; }
.text-black { font-weight: 900; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #60a5fa);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--primary-glow);
    filter: brightness(1.04);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(37, 99, 235, 0.24);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #16a34a);
    color: white;
    box-shadow: 0 4px 15px var(--success-glow);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #000;
    box-shadow: 0 4px 15px var(--warning-glow);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
    border-radius: 14px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: rgba(255,255,255,0.78);
    color: var(--text-primary);
}

.status-paid {
    background: rgba(22,163,74,0.10);
    color: #15803d;
    border-color: rgba(22,163,74,0.24);
}

.status-pending {
    background: rgba(217,119,6,0.10);
    color: #b45309;
    border-color: rgba(217,119,6,0.24);
}

.status-overdue {
    background: rgba(220,38,38,0.10);
    color: #b91c1c;
    border-color: rgba(220,38,38,0.24);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 10px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 0 0 3px var(--primary-light), 0 0 20px rgba(37, 99, 235, 0.08);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* ===== Navigation / Header ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 32px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(30px) saturate(1.3);
    -webkit-backdrop-filter: blur(30px) saturate(1.3);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.06);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.navbar-brand img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.navbar-menu a {
    padding: 8px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--text-primary);
    background: var(--glass);
}

/* ===== Sidebar ===== */
.app-layout {
    display: flex;
    min-height: calc(100vh - 67px);
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.68);
    backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    padding: 20px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    position: sticky;
    top: 67px;
    height: calc(100vh - 67px);
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.sidebar-link:hover {
    background: var(--glass);
    color: var(--text-primary);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-section {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 18px 16px 8px;
}

.main-content {
    flex: 1;
    padding: 32px;
    max-width: 1400px;
}

/* ===== Dashboard Cards ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3b82f6, #60a5fa);
    opacity: 0;
    transition: var(--transition);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.03;
    transition: var(--transition);
}

.stat-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow), 0 0 30px rgba(79, 70, 229, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover::after {
    opacity: 0.06;
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 16px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 8px;
    padding: 3px 8px;
    border-radius: 6px;
}

.stat-change.up {
    color: var(--success);
    background: rgba(34, 197, 94, 0.1);
}

.stat-change.down {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

/* ===== Tables ===== */
.table-container {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.table-header h4 {
    font-weight: 800;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 14px 24px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(37, 99, 235, 0.05);
}

td {
    padding: 16px 24px;
    font-size: 0.88rem;
    font-weight: 500;
    border-bottom: 1px solid rgba(37, 99, 235, 0.06);
}

tr {
    transition: var(--transition-fast);
}

tr:hover td {
    background: rgba(37, 99, 235, 0.03);
}

/* ===== Company Cards (Workspace) ===== */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.company-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 28px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

.company-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.company-card .company-logo {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: white;
}

.company-card .company-name {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.company-card .company-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.company-card .company-stats {
    display: flex;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--glass-border);
}

.company-card .company-stats span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== Add Company Card ===== */
.add-company-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-muted);
}

.add-company-card:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.add-company-card i {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
    position: relative;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3b82f6, #60a5fa);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--glass);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

/* ===== Chat Interface ===== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: rgba(248, 250, 255, 0.7);
}

.chat-message {
    max-width: 80%;
    padding: 14px 18px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
    animation: msgIn 0.3s ease;
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message.user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--glass-border);
    border-bottom-left-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.7);
    border-top: 1px solid var(--glass-border);
}

.chat-input-area input {
    flex: 1;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    outline: none;
    transition: var(--transition);
}

.chat-input-area input:focus {
    border-color: var(--primary);
}

/* ===== Landing Page ===== */
.landing-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
}

.landing-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
}

.landing-content h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: -0.04em;
    line-height: 1.05;
}

.landing-content p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 620px;
    margin: 0 auto 40px;
    line-height: 1.8;
    font-weight: 400;
}

.landing-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.landing-features {
    padding: 80px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 36px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(255, 255, 255, 0.18);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card .feature-icon {
    width: 68px;
    height: 68px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.feature-card h3 {
    margin-bottom: 10px;
    font-size: 1.15rem;
    font-weight: 800;
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.7;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.73rem;
    font-weight: 700;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* ===== Alerts ===== */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* ===== QR Code Display ===== */
.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: var(--border-radius);
    width: fit-content;
}

.qr-display img {
    width: 200px;
    height: 200px;
}

/* ===== Summary Section ===== */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.summary-card {
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.summary-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.summary-card-body {
    padding: 20px 24px;
}

/* ===== Loading ===== */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== Auth Pages ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px) saturate(1.3);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3b82f6, #60a5fa);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card .auth-logo h2 {
    margin-top: 12px;
}

.auth-card .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-card .auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

/* ===== Color Picker ===== */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}

.color-option:hover,
.color-option.selected {
    border-color: white;
    transform: scale(1.15);
}

/* ===== Page Header ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 900;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ===== Search Bar ===== */
.search-bar {
    position: relative;
}

.search-bar input {
    padding: 12px 16px 12px 44px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    width: 280px;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    width: 320px;
}

.search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ===== Utility Classes ===== */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.85rem; }
.text-muted { color: var(--text-secondary); }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* ===== Public Page ===== */
.public-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px;
}

.public-header {
    text-align: center;
    margin-bottom: 40px;
}

.public-header .company-logo-lg {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 16px;
}

/* ===== Toasts ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    box-shadow: var(--shadow);
    animation: toastIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Low Stock Indicator ===== */
.low-stock {
    background: rgba(239, 68, 68, 0.08);
}

.low-stock td {
    color: var(--danger);
}

/* ===== File Upload ===== */
.file-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    border: 2px dashed var(--glass-border);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.file-upload input[type="file"] {
    display: none;
}

/* ===== Charts Grid ===== */
.charts-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    position: relative;
    min-height: 300px;
}

.chart-card h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 1rem;
    font-weight: 800;
}

.chart-card canvas {
    max-height: 260px;
}

/* ===== Quick Actions ===== */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 600;
    transition: var(--transition);
}

.quick-action-btn:hover {
    background: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quick-action-btn i {
    font-size: 1.1rem;
}

/* ===== Report Tabs ===== */
.report-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.report-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.report-tab:hover {
    background: var(--glass-strong);
    color: var(--text-primary);
}

.report-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ===== P&L Table ===== */
.pnl-table {
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.pnl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.pnl-row:last-child {
    border-bottom: none;
}

.pnl-subtotal {
    background: rgba(255,255,255,0.03);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.pnl-total {
    background: var(--glass);
    border-top: 2px solid var(--primary);
}

.pnl-label {
    font-size: 0.95rem;
}

.pnl-value {
    font-size: 1rem;
    font-weight: 600;
}

/* ===== Progress Bar ===== */
.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.progress-bar-container .progress-bar {
    height: 6px;
    background: var(--primary);
    border-radius: 3px;
    min-width: 4px;
    max-width: 80px;
    transition: var(--transition);
}

.progress-bar-container span {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ===== Activity Timeline ===== */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
}

.activity-item:hover {
    background: var(--bg-card-hover);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}

.activity-icon.create {
    background: rgba(34,197,94,0.15);
    color: var(--success);
}

.activity-icon.update {
    background: rgba(59,130,246,0.15);
    color: var(--info);
}

.activity-icon.delete {
    background: rgba(239,68,68,0.15);
    color: var(--danger);
}

.activity-content {
    flex: 1;
}

.activity-text {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.9rem;
}

/* ===== Notifications ===== */
.notif-bell {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notification-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    align-items: flex-start;
}

.notification-item.unread {
    background: rgba(79,70,229,0.06);
    border-color: rgba(79,70,229,0.2);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.type-info { background: rgba(59,130,246,0.15); color: var(--info); }
.notification-icon.type-success { background: rgba(34,197,94,0.15); color: var(--success); }
.notification-icon.type-warning { background: rgba(245,158,11,0.15); color: var(--warning); }
.notification-icon.type-danger { background: rgba(239,68,68,0.15); color: var(--danger); }

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notification-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ===== Invoice Item Row ===== */
.invoice-item-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.invoice-item-row .form-control {
    flex: 1;
    min-width: 100px;
}

/* ===== Mobile Sidebar Toggle ===== */
.sidebar-toggle {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.hide-mobile {
    display: inline;
}

/* ===== Responsive Enhanced ===== */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 67px;
        height: calc(100vh - 67px);
        z-index: 150;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 260px;
        background: rgba(5, 5, 12, 0.97);
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: 67px;
        background: rgba(0,0,0,0.5);
        z-index: 140;
    }
    
    .app-layout.sidebar-open .sidebar {
        left: 0;
    }
    
    .app-layout.sidebar-open .sidebar-overlay {
        display: block;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .hide-mobile {
        display: none;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }
    
    .quick-action-btn {
        flex-shrink: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr !important;
    }
    
    .report-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .report-tab {
        flex-shrink: 0;
    }
    
    .invoice-item-row {
        flex-direction: column;
    }
    
    .invoice-item-row .form-control {
        width: 100% !important;
    }
    
    .landing-nav {
        padding: 16px 24px;
    }
    
    .landing-content {
        padding: 24px;
    }
    
    .landing-content h1 {
        font-size: 2.2rem;
    }
    
    .landing-features {
        padding: 40px 24px;
    }
    
    .company-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        padding: 12px 16px;
    }
    
    h1 { font-size: 1.5rem; font-weight: 900; }
    h2 { font-size: 1.25rem; font-weight: 800; }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-header h1 {
        font-size: 1.35rem;
        font-weight: 900;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 28px;
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
}

/* ===== Animated Counter ===== */
.counter-animate {
    transition: none;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}

.empty-state p {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--glass) 25%, rgba(255,255,255,0.1) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== Pulse Animation ===== */
.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ===== Smooth Page Fade ===== */
.main-content {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Stat Card Row Layout ===== */
.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ===== Profit Indicator ===== */
.profit-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
}

.profit-indicator.profit {
    background: rgba(34, 197, 94, 0.12);
    color: var(--success);
}

.profit-indicator.loss {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
}

/* ===== Gradient Border Wrapper ===== */
.gradient-border {
    position: relative;
    border: none !important;
}

.gradient-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), #3b82f6, #60a5fa);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

/* ===== Better scrollbar on sidebar ===== */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* ===== Toast Enhanced ===== */
.toast {
    font-weight: 500;
    font-family: var(--font);
}

/* ===== Status Dot ===== */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.active { background: var(--success); box-shadow: 0 0 8px var(--success-glow); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 8px var(--warning-glow); }
.status-dot.danger { background: var(--danger); box-shadow: 0 0 8px var(--danger-glow); }

/* ===== Hover Glow Effect ===== */
.hover-glow:hover {
    box-shadow: 0 0 40px var(--primary-glow);
}

/* ===== Print Styles ===== */
@media print {
    body::before, body::after { display: none; }
    .navbar, .sidebar, .sidebar-overlay, .quick-actions { display: none !important; }
    .main-content { padding: 0; animation: none; }
    .stat-card::before, .stat-card::after { display: none; }
}
