@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap');

:root {
    --ink: #111827;
    --slate: #475569;
    --primary: #0f203e;
    --primary-dark: #0b162b;
    --accent: #4b5563;
}

* {
    font-family: 'Archivo', sans-serif;
}

body,
body * {
    transition: background-color 1s ease, color 1s ease, border-color 1s ease;
}

.hero-gradient {
    position: relative;
    background: transparent;
    overflow: hidden;
}

.hero-gradient::before,
.hero-gradient::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: opacity 1s ease;
}

.hero-gradient::before {
    background: radial-gradient(circle at top, #f8fafc 0%, #f1f5f9 45%, #ffffff 100%);
    opacity: 1;
}

.hero-gradient::after {
    background: radial-gradient(circle at top, #0b1220 0%, #0f172a 55%, #0b1220 100%);
    opacity: 0;
}

.dark-mode .hero-gradient::before {
    opacity: 0;
}

.dark-mode .hero-gradient::after {
    opacity: 1;
}

.hero-gradient > * {
    position: relative;
    z-index: 1;
}

.accent-gradient {
    background: linear-gradient(135deg, #0f203e 0%, #4b5563 100%);
}

.section-surface {
    background-color: #f8fafc;
}

.dark-mode .section-surface {
    background-color: #0b1220;
}

.section-title {
    color: #0f172a;
}

.section-subtitle,
.section-body {
    color: #475569;
}

.dark-mode .section-title {
    color: #e2e8f0;
}

.dark-mode .section-subtitle,
.dark-mode .section-body {
    color: #cbd5f5;
}

.card-surface {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.dark-mode .card-surface {
    background-color: #0f172a;
    border-color: #1e293b;
}

.card-muted {
    background-color: #f1f5f9;
}

.dark-mode .card-muted {
    background-color: #1e293b;
}

.nav-surface {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.dark-mode .nav-surface {
    background-color: #0b1220;
    border-bottom-color: #1e293b;
}

.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
}

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

.logo-mark {
    height: 4rem;
    width: auto;
}

.logo-mark-sm {
    height: 4.2rem;
    width: auto;
    padding: 0.35rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    border-radius: 0.75rem;
}

.firm-logo-wrap {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.firm-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.firm-logo-preview {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    object-fit: contain;
    padding: 0.35rem;
}

.firm-logo-preview-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    background: #f1f5f9;
    border: 1px dashed #cbd5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.65rem;
    color: #64748b;
    padding: 0.25rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 92px;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    border: 1px solid transparent;
}

.action-btn-view {
    background: #e0f2fe !important;
    color: #075985 !important;
    border-color: #bae6fd;
}

.action-btn-update {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border-color: #fecaca;
}

.action-btn-upload {
    background: #dcfce7 !important;
    color: #166534 !important;
    border-color: #bbf7d0;
}

.action-btn-history {
    background: #ede9fe !important;
    color: #5b21b6 !important;
    border-color: #ddd6fe;
}

.toast-container {
    position: fixed;
    top: 5.5rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 60;
}

.toast {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid transparent;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    background: #ecfdf3;
    color: #166534;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #ecfdf3;
    color: #166534;
    border-color: #bbf7d0;
}

.toast-error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.dark-mode .toast {
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.dark-mode .toast-success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.4);
}

.dark-mode .toast-error {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.45);
}

.dark-mode .dark\:bg-slate-950 { background-color: #0b1220 !important; }
.dark-mode .dark\:bg-slate-900 { background-color: #0f172a !important; }
.dark-mode .dark\:bg-slate-800 { background-color: #1e293b !important; }
.dark-mode .dark\:bg-emerald-900\/30 { background-color: rgba(6, 78, 59, 0.3) !important; }
.dark-mode .dark\:bg-rose-900\/30 { background-color: rgba(136, 19, 55, 0.3) !important; }
.dark-mode .dark\:border-slate-800 { border-color: #1e293b !important; }
.dark-mode .dark\:border-slate-700 { border-color: #334155 !important; }
.dark-mode .dark\:text-slate-100 { color: #e2e8f0 !important; }
.dark-mode .dark\:text-slate-200 { color: #e2e8f0 !important; }
.dark-mode .dark\:text-slate-300 { color: #cbd5f5 !important; }
.dark-mode .dark\:text-slate-400 { color: #94a3b8 !important; }
.dark-mode .dark\:text-emerald-200 { color: #a7f3d0 !important; }
.dark-mode .dark\:text-rose-200 { color: #fecdd3 !important; }
.dark-mode .dark\:hover\:bg-slate-800:hover { background-color: #1e293b !important; }

.usage-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem 0.75rem;
}

.usage-type-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 0.78rem;
    color: #475569;
}

.usage-type-item .usage-count {
    font-weight: 700;
    color: #0f172a;
}

.dark-mode .usage-type-item {
    background: #0f172a;
    border-color: #1f2937;
    color: #cbd5f5;
}

.dark-mode .usage-type-item .usage-count {
    color: #f8fafc;
}

.firm-usage-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.firm-usage-row:last-child {
    border-bottom: none;
}

.firm-usage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.firm-usage-name {
    font-weight: 600;
    color: #0f172a;
}

.firm-usage-code {
    font-size: 0.75rem;
    color: #64748b;
}

.firm-usage-metrics {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
}

.firm-usage-bar {
    display: flex;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.firm-usage-used {
    background: linear-gradient(135deg, #0f203e 0%, #3b82f6 100%);
}

.firm-usage-remaining {
    background: #cbd5f5;
}

.dark-mode .firm-usage-row {
    border-bottom-color: #1f2937;
}

.dark-mode .firm-usage-name,
.dark-mode .firm-usage-metrics {
    color: #f8fafc;
}

.dark-mode .firm-usage-code {
    color: #94a3b8;
}

.dark-mode .firm-usage-bar {
    background: #1f2937;
}

.dark-mode .firm-usage-remaining {
    background: #334155;
}

.whatsapp-usage-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.whatsapp-usage-row:last-child {
    border-bottom: none;
}

.whatsapp-usage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.whatsapp-usage-name {
    font-weight: 600;
    color: #0f172a;
}

.whatsapp-usage-total {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
}

.whatsapp-usage-bar {
    position: relative;
    display: flex;
    width: 100%;
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

.whatsapp-usage-empty {
    flex: 1;
    background: #e2e8f0;
}

.whatsapp-usage-segment.segment-0 {
    background: #1d4ed8;
}

.whatsapp-usage-segment.segment-1 {
    background: #22c55e;
}

.whatsapp-usage-segment.segment-2 {
    background: #f97316;
}

.whatsapp-usage-segment.segment-3 {
    background: #a855f7;
}

.whatsapp-usage-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    color: #475569;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.legend-swatch.segment-0 {
    background: #1d4ed8;
}

.legend-swatch.segment-1 {
    background: #22c55e;
}

.legend-swatch.segment-2 {
    background: #f97316;
}

.legend-swatch.segment-3 {
    background: #a855f7;
}

.dark-mode .whatsapp-usage-legend {
    color: #94a3b8;
}

.dark-mode .legend-swatch.segment-0 {
    background: #60a5fa;
}

.whatsapp-locked {
    position: relative;
    margin-bottom: 1rem;
    border-radius: 1rem;
    overflow: hidden;
    background: rgba(148, 163, 184, 0.12);
    border: 1px dashed #cbd5f5;
    padding: 1rem;
}

.whatsapp-locked-card {
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}

.whatsapp-donut {
    width: 160px;
    height: 160px;
    margin: 0 auto 1rem;
    position: relative;
}

.whatsapp-donut-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(var(--whatsapp-donut, #e2e8f0));
    display: grid;
    place-items: center;
}

.whatsapp-donut-ring::after {
    content: '';
    width: 72%;
    height: 72%;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px #e2e8f0;
}

.whatsapp-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    text-align: center;
}

.whatsapp-legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.5rem 0.75rem;
}

.whatsapp-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: #475569;
}

.whatsapp-legend .legend-count {
    margin-left: auto;
    font-weight: 600;
    color: #0f172a;
}

.dark-mode .whatsapp-locked {
    border-color: #1f2937;
}

.dark-mode .whatsapp-locked-card {
    background: #111827;
    border-color: #1f2937;
}

.dark-mode .whatsapp-donut-ring::after {
    background: #111827;
    box-shadow: inset 0 0 0 1px #1f2937;
}

.dark-mode .whatsapp-legend .legend-item {
    color: #cbd5f5;
}

.dark-mode .whatsapp-legend .legend-count {
    color: #f8fafc;
}

.whatsapp-usage-segment {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.whatsapp-usage-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: #f8fafc;
    text-shadow: 0 1px 2px rgba(15, 23, 42, 0.5);
    white-space: nowrap;
    pointer-events: none;
    opacity: 0.9;
}

.whatsapp-usage-tooltip {
    position: absolute;
    right: 0.5rem;
    top: -0.5rem;
    transform: translateY(-100%);
    background: #0f172a;
    color: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 160px;
}

.whatsapp-usage-bar:hover .whatsapp-usage-tooltip {
    opacity: 1;
    transform: translateY(-110%);
}

.dark-mode .whatsapp-usage-row {
    border-bottom-color: #1f2937;
}

.dark-mode .whatsapp-usage-name,
.dark-mode .whatsapp-usage-total {
    color: #f8fafc;
}

.dark-mode .whatsapp-usage-bar,
.dark-mode .whatsapp-usage-empty {
    background: #1f2937;
}

.dark-mode .whatsapp-usage-tooltip {
    background: #111827;
    color: #e2e8f0;
}

.whatsapp-inbound-client {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-inbound-client + .whatsapp-inbound-client {
    margin-top: 12px;
}

.whatsapp-inbound-client.active {
    border-color: #1f2937;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.whatsapp-inbound-message + .whatsapp-inbound-message {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.dark-mode .whatsapp-inbound-client {
    background: #0f172a;
    border-color: #1e293b;
}

.dark-mode .whatsapp-inbound-client.active {
    border-color: #38bdf8;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.4);
}

.dark-mode .whatsapp-inbound-message + .whatsapp-inbound-message {
    border-top-color: #1e293b;
}

.magic-upload-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1.5rem;
}

.magic-upload-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
}

.dark-mode .magic-upload-card {
    background: #111827;
    border-color: #1f2937;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #0f172a;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.stat-icon-owner {
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
}

.stat-icon-employee {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.stat-icon-client {
    background: rgba(249, 115, 22, 0.15);
    color: #c2410c;
}

.stat-icon-otp {
    background: rgba(168, 85, 247, 0.15);
    color: #6d28d9;
}

.dark-mode .stat-icon {
    background: #1f2937;
    color: #e2e8f0;
}

.dark-mode .stat-icon-owner {
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
}

.dark-mode .stat-icon-employee {
    background: rgba(16, 185, 129, 0.18);
    color: #86efac;
}

.dark-mode .stat-icon-client {
    background: rgba(249, 115, 22, 0.18);
    color: #fdba74;
}

.dark-mode .stat-icon-otp {
    background: rgba(168, 85, 247, 0.18);
    color: #d8b4fe;
}

.action-btn-edit {
    background: #fef9c3 !important;
    color: #854d0e !important;
    border-color: #fde68a;
}

.action-btn-share {
    background: #cffafe !important;
    color: #0e7490 !important;
    border-color: #a5f3fc;
}

.action-btn-trace {
    background: #ede9fe !important;
    color: #4c1d95 !important;
    border-color: #c4b5fd;
}

.info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    border: 1px solid #cbd5f5;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 700;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.info-btn:hover {
    background: #e2e8f0;
}

.secret-code-btn {
    margin-top: 0.35rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px dashed #cbd5f5;
    background: #f8fafc;
    color: #1f2937;
    font-size: 0.75rem;
    font-weight: 600;
}

.secret-code-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9999px;
}

.status-icon svg {
    width: 16px;
    height: 16px;
}

.status-icon--active {
    background: #dcfce7;
    color: #15803d;
}

.status-icon--active svg {
    fill: #15803d;
}

.status-icon--inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.status-icon--inactive svg {
    fill: none;
    stroke: #b91c1c;
}

.firm-action-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.firm-action-toggle svg {
    width: 16px;
    height: 16px;
    fill: #475569;
}

.firm-action-toggle:hover {
    background: #f1f5f9;
}

.firm-action-menu {
    position: absolute;
    right: 0;
    top: 2.7rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 190px;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
    z-index: 20;
}

.firm-action-menu .action-btn {
    width: 100%;
    justify-content: flex-start;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid transparent;
}

.status-requested {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5f5;
}

.status-open {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5f5;
}

.status-submitted {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.status-in-review {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.status-approved {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.status-overdue {
    background: #ffedd5;
    color: #9a3412;
    border-color: #fed7aa;
}

.status-closed {
    background: #ede9fe;
    color: #5b21b6;
    border-color: #ddd6fe;
}

.status-in-progress {
    background: #e0f2fe;
    color: #075985;
    border-color: #bae6fd;
}

.status-complete {
    background: #d1fae5;
    color: #065f46;
    border-color: #a7f3d0;
}

.status-cancelled {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

.dashboard-body {
    background: radial-gradient(circle at top left, #f9fafb 0%, #f3f4f6 45%, #eef2f7 100%);
    color: #1b1b1f;
}

.dashboard-shell {
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.content-area {
    min-width: 0;
    background: #f8fafc;
}

.page-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px;
    position: relative;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.donut-chart {
    --donut-value: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#0f203e calc(var(--donut-value) * 1%), #e5e7eb 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 0 auto;
}

.donut-chart::after {
    content: "";
    position: absolute;
    width: 78px;
    height: 78px;
    background: #ffffff;
    border-radius: 50%;
}

.donut-value {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.progress-track {
    width: 100%;
    height: 8px;
    border-radius: 9999px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #0f203e;
    transition: width 0.35s ease;
}

.dark-mode .donut-chart {
    background: conic-gradient(#60a5fa calc(var(--donut-value) * 1%), #1f2937 0);
}

.dark-mode .donut-chart::after {
    background: #111827;
}

.dark-mode .donut-value {
    color: #e2e8f0;
}

.dark-mode .progress-track {
    background: #1f2937;
}

.dark-mode .progress-fill {
    background: #60a5fa;
}

.table {
    min-width: 960px;
}

.table th,
.table td {
    vertical-align: middle;
    white-space: normal;
}

.users-table {
    table-layout: fixed;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
    width: 22%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
    width: 24%;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3) {
    width: 22%;
}

.users-table th:nth-child(4),
.users-table td:nth-child(4) {
    width: 22%;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
    width: 10%;
    white-space: nowrap;
}

.meta-chip {
    margin-top: 0.35rem;
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: text;
}

.contact-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #1f2937;
}

.contact-line + .contact-line {
    margin-top: 0.35rem;
}

.contact-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    background: #eef2ff;
    color: #4c51bf;
}

.contact-icon svg {
    width: 12px;
    height: 12px;
    fill: #4c51bf;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.6rem;
    border: 1px solid #cbd5f5;
    background: #f8fafc;
    transition: all 0.2s ease;
}

.icon-button svg {
    width: 16px;
    height: 16px;
    fill: #475569;
}

.icon-button:hover {
    background: #f1f5f9;
}

.icon-button-danger {
    border-color: #fecaca;
    background: #fee2e2;
}

.icon-button-danger svg {
    fill: #b91c1c;
}

.icon-button-danger:hover {
    background: #fecaca;
}

.dark-mode .icon-button-danger {
    border-color: #fca5a5;
    background: #ef4444;
}

.dark-mode .icon-button-danger svg {
    fill: #ffffff;
}

.whatsapp-status-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.whatsapp-status-icon:hover {
    background: #e2e8f0;
}

.whatsapp-status-icon .whatsapp-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.whatsapp-status-icon.verified {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #16a34a;
}

.whatsapp-status-icon .whatsapp-tick {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-status-icon .whatsapp-tick svg {
    width: 10px;
    height: 10px;
    fill: #ffffff;
}

.dark-mode .whatsapp-status-icon {
    border-color: #1f2937;
    background: #111827;
    color: #64748b;
}

.dark-mode .whatsapp-status-icon:hover {
    background: #1f2937;
}

.dark-mode .whatsapp-status-icon.verified {
    border-color: #14532d;
    background: #052e16;
    color: #22c55e;
}

.dark-mode .whatsapp-status-icon .whatsapp-tick {
    background: #22c55e;
}

.whatsapp-status-icon.disabled {
    opacity: 0.55;
}

.email-status-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.email-status-icon:hover {
    background: #e2e8f0;
}

.email-status-icon .email-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.email-status-icon.verified {
    border-color: #bae6fd;
    background: #e0f2fe;
    color: #0284c7;
}

.email-status-icon .email-tick {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 9999px;
    background: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.email-status-icon .email-tick svg {
    width: 10px;
    height: 10px;
    fill: #ffffff;
}

.dark-mode .email-status-icon {
    border-color: #1f2937;
    background: #111827;
    color: #64748b;
}

.dark-mode .email-status-icon:hover {
    background: #1f2937;
}

.dark-mode .email-status-icon.verified {
    border-color: #075985;
    background: #0c4a6e;
    color: #38bdf8;
}

.dark-mode .email-status-icon .email-tick {
    background: #38bdf8;
}

.email-status-icon.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.reminder-icon {
    width: 18px;
    height: 18px;
    fill: #f59e0b;
}

.dark-mode .icon-button.icon-button-danger {
    background: #ef4444 !important;
    border-color: #fca5a5 !important;
}

.dark-mode .icon-button.icon-button-danger svg {
    fill: #ffffff !important;
}

.tab-loader {
    position: absolute;
    inset: 0;
    background: rgba(248, 250, 252, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    border-radius: 16px;
}

.tab-loader-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.2rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.tab-spinner {
    width: 30px;
    height: 30px;
    border-radius: 9999px;
    border: 3px solid #e2e8f0;
    border-top-color: #0f203e;
    animation: profile-spin 0.9s linear infinite;
}

.section-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.8rem;
}

.section-spinner {
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    border: 2px solid #e2e8f0;
    border-top-color: #0f203e;
    animation: profile-spin 0.9s linear infinite;
}

.profile-loader {
    position: fixed;
    inset: 0;
    background: rgba(248, 250, 252, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.profile-loader-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.2rem 1.4rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.profile-spinner {
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    border: 3px solid #e2e8f0;
    border-top-color: #0f203e;
    animation: profile-spin 0.9s linear infinite;
}

@keyframes profile-spin {
    to {
        transform: rotate(360deg);
    }
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    border: 1px solid #cbd5f5;
    background: #0f172a;
    color: #f8fafc;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.theme-toggle:hover {
    background: #1f2937;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.theme-toggle .theme-icon-sun {
    display: none;
}

.dark-mode .theme-toggle .theme-icon-sun {
    display: block;
}

.dark-mode .theme-toggle .theme-icon-moon {
    display: none;
}

.dark-mode .theme-toggle {
    background: #f8fafc;
    color: #0f172a;
    border-color: #e2e8f0;
}

.dark-mode .theme-toggle:hover {
    background: #e2e8f0;
}

.dark-mode body,
.dark-mode .dashboard-body {
    background: #0b1220;
    color: #e2e8f0;
}

.dark-mode .content-area {
    background: #0b1220;
}

/* Hero gradient handled by pseudo elements for smooth transitions. */

.dark-mode .text-primary {
    color: #93c5fd;
}

.logo-mark,
.logo-mark-sm {
    background: #f8fafc;
    padding: 0.35rem;
    border-radius: 0.75rem;
}

.dark-mode .firm-logo-wrap,
.dark-mode .firm-logo-preview,
.dark-mode .firm-logo-preview-placeholder {
    background: #0f172a;
    border-color: #1f2937;
}

.dark-mode .firm-logo-preview-placeholder {
    color: #cbd5f5;
}

.dark-mode .bg-white {
    background-color: #111827 !important;
}

.dark-mode .border-gray-200 {
    border-color: #1f2937 !important;
}

.dark-mode .text-gray-900 {
    color: #f1f5f9 !important;
}

.dark-mode .text-gray-700 {
    color: #cbd5f5 !important;
}

.dark-mode .text-gray-600 {
    color: #cbd5f5 !important;
}

.dark-mode .text-gray-500 {
    color: #94a3b8 !important;
}

.dark-mode .bg-gray-50 {
    background-color: #0f172a !important;
}

.dark-mode .bg-gray-100 {
    background-color: #111827 !important;
}

.dark-mode .bg-slate-100 {
    background-color: #1f2937 !important;
    color: #e2e8f0 !important;
}

.dark-mode .bg-slate-200 {
    background-color: #1f2937 !important;
    color: #e2e8f0 !important;
}

.dark-mode .glass {
    background: rgba(15, 23, 42, 0.85);
}

.dark-mode input,
.dark-mode textarea,
.dark-mode select {
    background-color: #0f172a;
    border-color: #1f2937;
    color: #e2e8f0;
}

.dark-mode input::placeholder,
.dark-mode textarea::placeholder {
    color: #94a3b8;
}

.dark-mode .hover\:bg-gray-50:hover {
    background-color: #1f2937 !important;
}

.dark-mode .hover\:bg-gray-100:hover {
    background-color: #1f2937 !important;
}

.dark-mode .tab-loader {
    background: rgba(2, 6, 23, 0.88);
}

.dark-mode .tab-loader-card {
    background: #111827;
    border-color: #1f2937;
}

.dark-mode .tab-spinner {
    border-color: #1f2937;
    border-top-color: #60a5fa;
}

.dark-mode .profile-loader {
    background: rgba(2, 6, 23, 0.88);
}

.dark-mode .profile-loader-card {
    background: #111827;
    border-color: #1f2937;
}

.dark-mode .profile-spinner {
    border-color: #1f2937;
    border-top-color: #60a5fa;
}

.dark-mode .apply-btn {
    background: #2563eb !important;
    color: #f8fafc !important;
}

.dark-mode .contact-line {
    color: #e2e8f0;
}

.dark-mode .contact-icon {
    background: #1f2937;
    color: #93c5fd;
}

.dark-mode .contact-icon svg {
    fill: #93c5fd;
}

.dark-mode .icon-button {
    background: #0f172a;
    border-color: #475569;
}

.dark-mode .icon-button svg {
    fill: #f8fafc;
}

.dark-mode .icon-button:hover {
    background: #1f2937;
    border-color: #64748b;
}

.firms-table {
    table-layout: fixed;
}

.firms-table th:nth-child(1),
.firms-table td:nth-child(1) {
    width: 28%;
}

.firms-table th:nth-child(2),
.firms-table td:nth-child(2) {
    width: 10%;
    white-space: nowrap;
}

.firms-table th:nth-child(3),
.firms-table td:nth-child(3),
.firms-table th:nth-child(4),
.firms-table td:nth-child(4),
.firms-table th:nth-child(5),
.firms-table td:nth-child(5) {
    width: 8%;
    white-space: nowrap;
}

.firms-table th:nth-child(6),
.firms-table td:nth-child(6) {
    width: 12%;
    white-space: nowrap;
}

.firms-table th:nth-child(7),
.firms-table td:nth-child(7) {
    width: 14%;
    white-space: nowrap;
}

.firms-table th:nth-child(8),
.firms-table td:nth-child(8) {
    width: 6%;
    white-space: nowrap;
}


.firms-table td:nth-child(1) .secret-code-btn {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-wrap {
    overflow-x: auto;
}

.nav-link-active {
    background: #e2e8f0;
    color: #0f172a;
}

.dark-mode .text-gray-900 { color: #e2e8f0 !important; }
.dark-mode .text-gray-800 { color: #e2e8f0 !important; }
.dark-mode .text-gray-700 { color: #cbd5f5 !important; }
.dark-mode .text-gray-600 { color: #cbd5f5 !important; }
.dark-mode .text-gray-500 { color: #94a3b8 !important; }
.dark-mode .text-gray-400 { color: #94a3b8 !important; }
.dark-mode .bg-white { background-color: #0f172a !important; }
.dark-mode .bg-gray-50 { background-color: #0b1220 !important; }
.dark-mode .bg-slate-50 { background-color: #0b1220 !important; }
.dark-mode .border-gray-200 { border-color: #1e293b !important; }
.dark-mode .border-gray-300 { border-color: #334155 !important; }

.public-page {
    color: #0f172a;
}

.public-page p,
.public-page li {
    color: #475569;
}

.dark-mode .public-page {
    color: #e2e8f0;
}

.dark-mode .public-page p,
.dark-mode .public-page li {
    color: #cbd5f5;
}

.public-page .pricing-dark-card p,
.public-page .pricing-dark-card li {
    color: #e2e8f0;
}

.public-page .pricing-dark-card .text-slate-300 {
    color: #cbd5f5;
}

.public-page .pricing-dark-card .text-slate-200 {
    color: #e2e8f0;
}

.dark-mode .pricing-dark-card {
    background-color: #111827;
    border-color: #475569;
}

.dark-mode .pricing-dark-card p,
.dark-mode .pricing-dark-card li,
.dark-mode .pricing-dark-card .text-slate-300 {
    color: #f8fafc;
}

.dark-mode .pricing-dark-card .text-slate-200 {
    color: #ffffff;
}

footer {
    color: #cbd5f5;
}

footer a,
footer p,
footer li {
    color: #cbd5f5;
}

footer a:hover {
    color: #f8fafc;
}

footer .footer-brand {
    color: #e2e8f0;
}

footer .footer-copy {
    color: #94a3b8;
}

.dark-mode footer .footer-copy {
    color: #cbd5f5;
}

@media (max-width: 1024px) {
    .dashboard-shell {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        height: auto;
        width: 100%;
    }

    .page-container {
        padding: 16px;
    }
}

body,
body * {
    transition: background-color 1s ease, color 1s ease, border-color 1s ease !important;
}
