:root {
    --primary: #0089d1;
    --secondary: #0b3c5d;
    --accent: #38bdf8;
    --green: #16a34a;
    --red: #dc2626;
    --yellow: #ca8a04;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --bg: #f6f8fb;
    --paper: #ffffff;
    --soft: #eef6fb;
    --line: #e2e8f0;
    --card-bg: #ffffff;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.08);
}

html,
body {
    font-family: "Poppins", sans-serif;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background: var(--secondary);
}

button {
    cursor: pointer;
}

/* Common Classes */
.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(249, 250, 251, 0.95));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card {
    background: var(--card-bg, #fff);
    backdrop-filter: blur(8px) saturate(120%);
    box-shadow:
        0 6px 20px rgba(16, 24, 40, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.5) inset;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 16px;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-muted {
    background: #e5e7eb;
    color: #374151;
}

/* Badges / Chips / Tags */
.tag,
.chip,
.badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.55rem;
    border-radius: 9999px;
    font-weight: 600;
}

.tag-green,
.pill-ok,
.badge-ok,
.chip-approved,
.badge-approved {
    background: color-mix(in srgb, var(--green) 12%, transparent);
    color: var(--green);
}

.tag-amber,
.pill-warn,
.badge-warn,
.badge-pending,
.chip-pending {
    background: color-mix(in srgb, var(--yellow) 12%, transparent);
    color: var(--yellow);
}

.tag-red,
.pill-bad,
.badge-rejected,
.chip-rejected {
    background: color-mix(in srgb, var(--red) 12%, transparent);
    color: var(--red);
}

.badge-paid {
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

.badge-unpaid {
    background: var(--soft);
    color: var(--muted);
}

/* Forms */
.input {
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    width: 100%;
    background-color: var(--paper);
    color: var(--secondary);
}

.input:focus {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
    border-color: var(--primary);
}

.textarea {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.7rem 0.8rem;
    width: 100%;
    resize: vertical;
}

.textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
    border-color: var(--primary);
}

/* Tables */
.thead-sticky thead th,
.table-soft thead th {
    position: sticky;
    top: 0;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    z-index: 1;
    font-weight: 600;
    padding: 0.75rem 1rem;
}
.table-scroll::-webkit-scrollbar {
    height: 8px;
}
.table-scroll::-webkit-scrollbar-thumb {
    background: rgba(2, 6, 23, 0.12);
    border-radius: 9999px;
}
.table-soft td {
    padding: 0.65rem 0.75rem;
}
.card-compact {
    padding: 1rem !important;
}
.badge-compact {
    font-size: 10px !important;
    padding: 0.15rem 0.5rem !important;
}
/* Specific Utilities */
.smooth {
    transition: all 0.25s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.currency:before {
    content: "₹";
    margin-right: 0.15rem;
}
.brand-dot {
    background: var(--primary);
}
.alert {
    border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
    background: color-mix(in srgb, var(--red) 8%, transparent);
    color: var(--red);
}

/* Sidebar Specifics */
.sidebar {
    will-change: transform;
}
.sidebar-backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

@media print {
    .app-sidebar,
    aside.sidebar,
    header,
    .toolbar {
        display: none !important;
    }
    .app-main,
    main {
        margin: 0 !important;
        padding: 0 !important;
        display: block;
    }
    body {
        background: white;
    }
}

/* Notification System  */
#notification-dropdown {
    transform-origin: top right;
    transition: all 0.2s ease-in-out;
}
#notification-dropdown.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    display: none;
}
#notification-dropdown:not(.hidden) {
    opacity: 1;
    transform: scale(1);
    display: block;
}
.notif-item {
    transition: background-color 0.1s;
}
.notif-item:hover {
    background-color: var(--soft);
}
.notif-unread {
    background-color: color-mix(in srgb, var(--primary) 5%, transparent);
}
.notif-badge {
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0);
    }
}