/* Temporary offline UI: minimal utility classes, no external assets. */

:root {
    --bg-main: #0f172a;
    --bg-panel: #111827;
    --bg-card: #1f2937;
    --text-primary: #f8fafc;
    --text-secondary: #9ca3af;
    --border-color: #1f2937;
    --input-bg: #1e293b;
    --input-border: #334155;
    --accent-color: #eab308;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: #93c5fd;
    text-decoration: none;
}

/* Layout helpers */
.hidden { display: none !important; }
.block { display: block; }
.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-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-6 { margin-bottom: 24px; }
.mt-1 { margin-top: 4px; }

.text-center { text-align: center; }
.text-3xl { font-size: 30px; }

.w-full { width: 100%; }
.w-64 { width: 256px; }
.w-24 { width: 96px; }
.w-10 { width: 40px; }
.max-w-sm { max-width: 384px; }
.max-w-md { max-width: 448px; }
.h-full { height: 100%; }
.h-screen { height: 100vh; }
.h-16 { height: 64px; }
.h-24 { height: 96px; }
.h-10 { height: 40px; }

.p-2 { padding: 8px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 32px; }
.mt-6 { margin-top: 24px; }
.pt-4 { padding-top: 16px; }
.space-y-4 > * + * { margin-top: 16px; }

.text-xs { font-size: 12px; }
.text-sm { font-size: 14px; }
.text-lg { font-size: 18px; }
.text-xl { font-size: 20px; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

.rounded { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid var(--border-color); }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-l { border-left: 1px solid var(--border-color); }
.border-t { border-top: 1px solid var(--border-color); }
.border-t-4 { border-top-width: 4px; }
.border-gray-800 { border-color: #1f2937; }
.border-gray-700 { border-color: #374151; }
.border-yellow-500 { border-color: #eab308; }

.bg-gray-900 { background-color: #111827; }
.bg-gray-800 { background-color: #1f2937; }
.bg-gray-700 { background-color: #374151; }
.bg-black\/50 { background-color: rgba(0, 0, 0, 0.5); }
.bg-gray-900\/50 { background-color: rgba(17, 24, 39, 0.5); }
.bg-gray-800\/50 { background-color: rgba(31, 41, 55, 0.5); }

.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-yellow-500 { color: #eab308; }
.text-green-400 { color: #4ade80; }
.text-red-500 { color: #ef4444; }
.text-blue-400 { color: #60a5fa; }
.text-purple-400 { color: #c084fc; }

.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.shadow-xl { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35); }
.shadow-2xl { box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4); }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.left-0 { left: 0; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

.transform { transform: translateX(0); }
.translate-x-full { transform: translateX(100%); }
.translate-x-0 { transform: translateX(0); }
.transition-transform { transition: transform 0.3s; }
.duration-300 { transition-duration: 300ms; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-50 { z-index: 50; }

/* Components */
.glass {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
}

.input {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 6px;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #ca8a04, #eab308);
    color: #000000;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.sidebar-item {
    padding: 10px 12px;
    margin: 4px 0;
    border-radius: 8px;
    cursor: pointer;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: rgba(234, 179, 8, 0.12);
    color: #eab308;
}

/* Basic table styling */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

/* Minimal responsive helpers */
@media (min-width: 768px) {
    .md\:hidden { display: none !important; }
    .md\:relative { position: relative !important; }
    .md\:translate-x-0 { transform: translateX(0) !important; }
    .md\:px-6 { padding-left: 24px; padding-right: 24px; }
    .md\:gap-4 { gap: 16px; }
}

/* Offline theme enhancements */
body.offline-ui {
    position: relative;
    background: radial-gradient(1200px 700px at 95% -10%, #1f2937 0%, rgba(15, 23, 42, 0) 60%),
        radial-gradient(900px 600px at -5% 10%, rgba(15, 118, 110, 0.15) 0%, rgba(15, 23, 42, 0) 55%),
        #0f172a;
    color: var(--text-primary);
}

body.offline-ui::before,
body.offline-ui::after {
    content: "";
    position: fixed;
    z-index: -1;
    pointer-events: none;
}

body.offline-ui::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.18) 0%, rgba(234, 179, 8, 0) 70%);
}

body.offline-ui::after {
    width: 520px;
    height: 520px;
    bottom: -200px;
    left: -140px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0) 70%);
}

body.offline-ui main {
    background: rgba(15, 23, 42, 0.55);
}

body.offline-ui header {
    backdrop-filter: blur(8px);
}

body.offline-ui .glass {
    background: rgba(17, 24, 39, 0.88);
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.45);
}

body.offline-ui #main-sidebar {
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid rgba(148, 163, 184, 0.12);
}

body.offline-ui header {
    background: rgba(15, 23, 42, 0.7);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

body.offline-ui .input {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(148, 163, 184, 0.25);
}

thead {
    background: rgba(31, 41, 55, 0.5);
}

tbody tr:hover {
    background: rgba(31, 41, 55, 0.35);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

/* Extended layout helpers */
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }
.flex-1 { flex: 1 1 0%; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-end { justify-content: flex-end; }
.self-center { align-self: center; }

.gap-1 { gap: 4px; }
.gap-1\.5 { gap: 6px; }
.gap-5 { gap: 20px; }

.p-3 { padding: 12px; }
.p-5 { padding: 20px; }
.px-2 { padding-left: 8px; padding-right: 8px; }
.px-2\.5 { padding-left: 10px; padding-right: 10px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.py-0\.5 { padding-top: 2px; padding-bottom: 2px; }
.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-1\.5 { padding-top: 6px; padding-bottom: 6px; }
.py-2\.5 { padding-top: 10px; padding-bottom: 10px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-8 { padding-top: 32px; padding-bottom: 32px; }
.py-10 { padding-top: 40px; padding-bottom: 40px; }
.pb-1 { padding-bottom: 4px; }
.pb-4 { padding-bottom: 16px; }
.pb-24 { padding-bottom: 96px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pr-0 { padding-right: 0; }
.pr-6 { padding-right: 24px; }
.pr-8 { padding-right: 32px; }
.pr-9 { padding-right: 36px; }

.mb-1 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mt-0\.5 { margin-top: 2px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-4 { margin-left: 16px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mx-2 { margin-left: 8px; margin-right: 8px; }
.my-8 { margin-top: 32px; margin-bottom: 32px; }
.my-10 { margin-top: 40px; margin-bottom: 40px; }

.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-6 > * + * { margin-top: 24px; }

.w-2 { width: 8px; }
.w-3 { width: 12px; }
.w-4 { width: 16px; }
.w-12 { width: 48px; }
.w-16 { width: 64px; }
.w-20 { width: 80px; }
.w-32 { width: 128px; }
.w-48 { width: 192px; }
.w-56 { width: 224px; }
.w-80 { width: 320px; }

.h-2 { height: 8px; }
.h-3 { height: 12px; }
.h-4 { height: 16px; }
.h-9 { height: 36px; }
.h-12 { height: 48px; }
.h-20 { height: 80px; }
.h-\[42px\] { height: 42px; }
.h-\[90vh\] { height: 90vh; }

.min-w-\[120px\] { min-width: 120px; }
.min-w-\[140px\] { min-width: 140px; }
.min-w-\[200px\] { min-width: 200px; }
.min-w-\[240px\] { min-width: 240px; }
.min-w-\[700px\] { min-width: 700px; }
.min-w-\[800px\] { min-width: 800px; }
.min-w-\[1000px\] { min-width: 1000px; }

.max-w-lg { max-width: 512px; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 768px; }
.max-w-4xl { max-width: 896px; }
.max-w-5xl { max-width: 1024px; }
.max-w-6xl { max-width: 1152px; }
.max-w-7xl { max-width: 1280px; }

.max-h-48 { max-height: 192px; }
.max-h-64 { max-height: 256px; }
.max-h-96 { max-height: 384px; }
.max-h-screen { max-height: 100vh; }
.max-h-\[90vh\] { max-height: 90vh; }

.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-base { font-size: 16px; }
.text-2xl { font-size: 24px; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: Consolas, "Courier New", monospace; }
.uppercase { text-transform: uppercase; }
.tracking-wide { letter-spacing: 0.04em; }
.tracking-wider { letter-spacing: 0.08em; }
.leading-relaxed { line-height: 1.7; }
.italic { font-style: italic; }
.line-through { text-decoration: line-through; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-gray-200 { color: #e5e7eb; }
.text-gray-600 { color: #4b5563; }
.text-blue-200 { color: #bfdbfe; }
.text-blue-300 { color: #93c5fd; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-green-300 { color: #86efac; }
.text-red-400 { color: #f87171; }
.text-red-500\/60 { color: rgba(239, 68, 68, 0.6); }
.text-yellow-100 { color: #fef9c3; }
.text-yellow-300 { color: #fde047; }
.text-yellow-300\/80 { color: rgba(253, 224, 71, 0.8); }
.text-yellow-400 { color: #facc15; }
.text-amber-300 { color: #fcd34d; }
.text-pink-500 { color: #ec4899; }
.text-black { color: #000000; }

.bg-black\/80 { background-color: rgba(0, 0, 0, 0.8); }
.bg-black\/95 { background-color: rgba(0, 0, 0, 0.95); }
.bg-blue-500\/10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-blue-500\/20 { background-color: rgba(59, 130, 246, 0.2); }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-900\/20 { background-color: rgba(30, 58, 138, 0.2); }
.bg-blue-900\/40 { background-color: rgba(30, 58, 138, 0.4); }
.bg-gray-600 { background-color: #4b5563; }
.bg-gray-700\/30 { background-color: rgba(55, 65, 81, 0.3); }
.bg-gray-800\/30 { background-color: rgba(31, 41, 55, 0.3); }
.bg-gray-800\/40 { background-color: rgba(31, 41, 55, 0.4); }
.bg-gray-800\/80 { background-color: rgba(31, 41, 55, 0.8); }
.bg-gray-900\/20 { background-color: rgba(17, 24, 39, 0.2); }
.bg-gray-900\/30 { background-color: rgba(17, 24, 39, 0.3); }
.bg-gray-900\/40 { background-color: rgba(17, 24, 39, 0.4); }
.bg-green-500 { background-color: #22c55e; }
.bg-green-500\/20 { background-color: rgba(34, 197, 94, 0.2); }
.bg-green-600 { background-color: #16a34a; }
.bg-green-900\/20 { background-color: rgba(20, 83, 45, 0.2); }
.bg-purple-600 { background-color: #9333ea; }
.bg-red-500 { background-color: #ef4444; }
.bg-red-600\/80 { background-color: rgba(220, 38, 38, 0.8); }
.bg-red-900\/20 { background-color: rgba(127, 29, 29, 0.2); }
.bg-slate-700 { background-color: #334155; }
.bg-slate-800 { background-color: #1e293b; }
.bg-slate-900 { background-color: #0f172a; }
.bg-yellow-500 { background-color: #eab308; }
.bg-yellow-500\/10 { background-color: rgba(234, 179, 8, 0.1); }
.bg-yellow-500\/20 { background-color: rgba(234, 179, 8, 0.2); }
.bg-yellow-600 { background-color: #ca8a04; }
.bg-yellow-900\/20 { background-color: rgba(113, 63, 18, 0.2); }
.bg-yellow-900\/40 { background-color: rgba(113, 63, 18, 0.4); }

.bg-gradient-to-br { background-image: linear-gradient(135deg, var(--tw-gradient-from, #0f172a), var(--tw-gradient-to, #1f2937)); }
.from-blue-900\/30 { --tw-gradient-from: rgba(30, 58, 138, 0.3); }
.to-purple-900\/30 { --tw-gradient-to: rgba(88, 28, 135, 0.3); }

.border-2 { border-width: 2px; }
.border-b-2 { border-bottom-width: 2px; }
.border-l-4 { border-left-width: 4px; }
.border-r-4 { border-right-width: 4px; }
.border-dashed { border-style: dashed; }
.border-transparent { border-color: transparent; }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-500\/20 { border-color: rgba(59, 130, 246, 0.2); }
.border-blue-500\/30 { border-color: rgba(59, 130, 246, 0.3); }
.border-blue-600 { border-color: #2563eb; }
.border-gray-600 { border-color: #4b5563; }
.border-gray-700\/30 { border-color: rgba(55, 65, 81, 0.3); }
.border-gray-700\/50 { border-color: rgba(55, 65, 81, 0.5); }
.border-gray-800\/50 { border-color: rgba(31, 41, 55, 0.5); }
.border-green-500 { border-color: #22c55e; }
.border-green-600 { border-color: #16a34a; }
.border-purple-500 { border-color: #a855f7; }
.border-red-500 { border-color: #ef4444; }
.border-red-600 { border-color: #dc2626; }
.border-yellow-500\/50 { border-color: rgba(234, 179, 8, 0.5); }
.border-yellow-700 { border-color: #a16207; }

.shadow-lg { box-shadow: 0 12px 25px rgba(15, 23, 42, 0.35); }
.shadow-blue-500\/30 { box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3); }
.shadow-yellow-500\/20 { box-shadow: 0 10px 20px rgba(234, 179, 8, 0.2); }
.shadow-yellow-900\/20 { box-shadow: 0 10px 20px rgba(113, 63, 18, 0.2); }

.overflow-x-auto { overflow-x: auto; }
.pointer-events-none { pointer-events: none; }
.cursor-pointer { cursor: pointer; }
.resize-none { resize: none; }
.list-disc { list-style-type: disc; }
.list-inside { list-style-position: inside; }
.break-all { word-break: break-all; }
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.top-1 { top: 4px; }
.top-2 { top: 8px; }
.top-14 { top: 56px; }
.top-1\/2 { top: 50%; }
.right-1 { right: 4px; }
.right-3 { right: 12px; }
.left-1 { left: 4px; }
.left-2 { left: 8px; }
.left-3 { left: 12px; }
.bottom-0 { bottom: 0; }
.inset-y-0 { top: 0; bottom: 0; }
.z-40 { z-index: 40; }

.-translate-y-1\/2 { transform: translateY(-50%); }

.transition { transition: all 0.2s ease; }
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }
.transition-transform { transition: transform 0.2s ease; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-110:hover { transform: scale(1.1); }

.backdrop-blur { backdrop-filter: blur(8px); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }

.focus\:outline-none:focus { outline: none; }
.focus\:border-blue-500:focus { border-color: #3b82f6; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2); }
.focus\:ring-blue-500\/20:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }
.focus\:ring-blue-500\/50:focus { box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); }
.focus\:ring-yellow-500\/30:focus { box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.3); }
.focus\:ring-yellow-500\/50:focus { box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.5); }
.focus\:ring-gray-700:focus { box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.5); }

.hover\:bg-blue-500:hover { background-color: #3b82f6; }
.hover\:bg-blue-600:hover { background-color: #2563eb; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-gray-600:hover { background-color: #4b5563; }
.hover\:bg-gray-700:hover { background-color: #374151; }
.hover\:bg-gray-700\/50:hover { background-color: rgba(55, 65, 81, 0.5); }
.hover\:bg-gray-800:hover { background-color: #1f2937; }
.hover\:bg-gray-800\/40:hover { background-color: rgba(31, 41, 55, 0.4); }
.hover\:bg-gray-800\/50:hover { background-color: rgba(31, 41, 55, 0.5); }
.hover\:bg-green-700:hover { background-color: #15803d; }
.hover\:bg-purple-700:hover { background-color: #6d28d9; }
.hover\:bg-red-600:hover { background-color: #dc2626; }
.hover\:bg-yellow-500\/10:hover { background-color: rgba(234, 179, 8, 0.1); }

.hover\:border-blue-500\/50:hover { border-color: rgba(59, 130, 246, 0.5); }
.hover\:border-gray-600:hover { border-color: #4b5563; }
.hover\:border-yellow-500:hover { border-color: #eab308; }
.hover\:border-yellow-500\/30:hover { border-color: rgba(234, 179, 8, 0.3); }

.hover\:text-blue-300:hover { color: #93c5fd; }
.hover\:text-blue-400:hover { color: #60a5fa; }
.hover\:text-green-300:hover { color: #86efac; }
.hover\:text-green-400:hover { color: #4ade80; }
.hover\:text-purple-300:hover { color: #d8b4fe; }
.hover\:text-red-400:hover { color: #f87171; }
.hover\:text-red-500:hover { color: #ef4444; }
.hover\:text-red-700:hover { color: #b91c1c; }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-yellow-400:hover { color: #facc15; }

.group:hover .group-hover\:text-white { color: #ffffff; }

.divide-y > * + * { border-top: 1px solid var(--border-color); }
.divide-gray-700 > * + * { border-top-color: #374151; }
.divide-gray-800 > * + * { border-top-color: #1f2937; }

.border-collapse { border-collapse: collapse; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.col-span-4 { grid-column: span 4 / span 4; }
.col-span-full { grid-column: 1 / -1; }

.rounded-xl { border-radius: 16px; }
.rounded-2xl { border-radius: 20px; }

.accent-yellow-500 { accent-color: #eab308; }
.form-checkbox,
.role-checkbox,
.view-role-checkbox,
.delete-role-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #eab308;
    cursor: pointer;
}

.dir-ltr { direction: ltr; text-align: left; }
.money-input { direction: ltr; text-align: right; font-family: Consolas, "Courier New", monospace; }

.btn-secondary {
    background: rgba(15, 23, 42, 0.3);
    color: #e2e8f0;
    border: 1px solid rgba(148, 163, 184, 0.3);
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: rgba(148, 163, 184, 0.6);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.btn-danger:hover {
    filter: brightness(1.05);
}

.view-section {
    min-height: 100%;
    scrollbar-gutter: stable;
}

.profile-tab,
.lookup-tab {
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.profile-tab.active,
.lookup-tab.active {
    color: #eab308;
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.08);
}

.profile-tab-content,
.lookup-tab-content,
.deal-details-tab {
    animation: fade-in 0.2s ease-in-out;
}

.quick-filter-chip {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(55, 65, 81, 0.6);
    background: rgba(31, 41, 55, 0.6);
    color: #cbd5f5;
    cursor: pointer;
}

.quick-filter-chip.active {
    background: #eab308;
    color: #111827;
    border-color: #ca8a04;
}

.deal-card {
    border: 1px solid rgba(55, 65, 81, 0.6);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.65);
}

.deal-card:hover {
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
}

.notification-popup {
    position: fixed;
    top: 80px;
    right: 20px;
    min-width: 300px;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    z-index: 9999;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
    direction: rtl;
}

.notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-popup.hide {
    opacity: 0;
    transform: translateX(100%);
}

.notification-popup-content { padding: 16px; }
.notification-popup-title { font-weight: 700; font-size: 14px; }
.notification-popup-message { font-size: 13px; color: #cbd5f5; line-height: 1.5; }

.animate-pulse {
    animation: pulse 1.6s ease-in-out infinite;
}

.drop-shadow-2xl {
    filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}

.object-contain {
    object-fit: contain;
}

.payment-date-jalali {
    direction: ltr;
    text-align: right;
}

body.offline-ui i.fa-solid,
body.offline-ui i.fa-regular,
body.offline-ui i.fa-brands {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    border-radius: 3px;
    background: currentColor;
    opacity: 0.35;
}

body.offline-ui .flatpickr-calendar {
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    color: #e2e8f0;
    font-size: 13px;
}

body.offline-ui .flatpickr-day {
    border-radius: 8px;
    color: #cbd5f5;
}

body.offline-ui .flatpickr-day:hover {
    background: rgba(59, 130, 246, 0.2);
    color: #ffffff;
}

body.offline-ui .flatpickr-day.selected,
body.offline-ui .flatpickr-day.startRange,
body.offline-ui .flatpickr-day.endRange {
    background: #eab308;
    color: #0f172a;
    border-color: #eab308;
}

body.offline-ui .flatpickr-weekday {
    color: #94a3b8;
}

.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }

@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { opacity: 0.4; transform: scale(0.96); }
    50% { opacity: 1; transform: scale(1); }
    100% { opacity: 0.4; transform: scale(0.96); }
}

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\:p-6 { padding: 24px; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row; }
    .md\:items-center { align-items: center; }
    .md\:items-start { align-items: flex-start; }
    .md\:justify-between { justify-content: space-between; }
    .md\:w-48 { width: 192px; }
    .md\:w-56 { width: 224px; }
    .md\:w-64 { width: 256px; }
    .md\:w-72 { width: 288px; }
    .md\:w-auto { width: auto; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-grow-0 { flex-grow: 0; }
    .md\:max-w-2xl { max-width: 672px; }
}

@media (min-width: 1024px) {
    .lg\:w-80 { width: 320px; }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lg\:grid-cols-7 { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .xl\:max-w-5xl { max-width: 1024px; }
    .xl\:max-w-6xl { max-width: 1152px; }
    .xl\:max-w-7xl { max-width: 1280px; }
}

@media (min-width: 1536px) {
    .2xl\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
