/*
 * Nero Home panel theme: docs/design-system.md applied to Filament. Plain CSS loaded after Filament's own (no
 * build step on the server). Colours come from the panel palette (AdminPanelProvider); this file sets type, rhythm,
 * sizes and the few shapes Filament has no setting for.
 */

:root {
    --mp-navy: #323E4F;
    --mp-blue: #323E4F;
    --mp-paper: #F5F6F2;
    --mp-line: #E3E5DF;
    --mp-line-strong: #CDD1C8;
    --mp-muted: #5B6573;
    --mp-radius-sm: 8px;
    --mp-radius-md: 12px;
    --mp-radius-lg: 16px;
    --mp-float: 0 8px 24px -12px rgba(20, 32, 46, .18);
}

body { letter-spacing: 0; -webkit-font-smoothing: antialiased; }

/* Numbers line up in columns (Latin digits of IBM Plex are fixed-width; this covers fallback fonts). */
.fi-ta-text-item, .fi-wi-stats-overview-stat-value, .fi-in-text, .mp-num { font-variant-numeric: tabular-nums; }

/* Wordmark: the primary mark and the name, Arabic first. */
.mp-brand { display: inline-flex; align-items: center; gap: 10px; }
.mp-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.mp-brand-text b { font-size: 16px; font-weight: 700; color: var(--mp-navy); }
.mp-brand-text small { font-size: 11px; color: var(--mp-muted); }

/* Numbers, phones, emails and links read left to right in the Arabic forms, aligned with their labels. */
.fi-input[type="number"], .fi-input[type="tel"], .fi-input[type="email"], .fi-input[type="url"],
.fi-input[inputmode="numeric"], .fi-input[inputmode="decimal"], .fi-input[dir="ltr"] {
    direction: ltr;
    text-align: right;
}

/* ---- Sizes: 44px targets (40px for the dense table tools on large screens) ---- */
.fi-input-wrp { min-height: 44px; border-radius: var(--mp-radius-md); }
.fi-input-wrp .fi-input { min-height: 42px; font-size: 16px; }
.fi-btn { min-height: 44px; border-radius: var(--mp-radius-md); font-weight: 700; }
.fi-btn.fi-size-sm, .fi-btn.fi-size-xs { min-height: 36px; }
.fi-icon-btn { min-width: 40px; min-height: 40px; }
.fi-sidebar-item-btn { min-height: 44px; border-radius: var(--mp-radius-md); }
.fi-checkbox-input { width: 20px; height: 20px; }
@media (max-width: 1023px) {
    .fi-btn.fi-size-sm, .fi-btn.fi-size-xs, .fi-icon-btn { min-height: 44px; min-width: 44px; }
    .fi-tabs-item, .fi-user-menu-trigger { min-height: 44px; min-width: 44px; }
    .fi-ta-header-cell-sort-btn, .fi-ta-actions .fi-link { min-height: 44px; }
}

/* ---- Surfaces: thin borders, no shadows except floating layers ---- */
.fi-section, .fi-wi-stats-overview-stat, .fi-ta-ctn, .fi-fo-tabs, .fi-wi-chart .fi-section {
    box-shadow: none !important;
    border: 1px solid var(--mp-line);
    border-radius: var(--mp-radius-lg);
    --tw-ring-shadow: 0 0 #0000;
}
.fi-dropdown-panel, .fi-modal-window { box-shadow: var(--mp-float) !important; border-radius: var(--mp-radius-lg); }
.fi-topbar nav, .fi-topbar > div { box-shadow: none; border-bottom: 1px solid var(--mp-line); }
.fi-sidebar { border-inline-end: 1px solid var(--mp-line); }
.fi-sidebar-group-label { font-size: 12px; font-weight: 700; color: var(--mp-muted); letter-spacing: 0; }
.fi-header-heading { font-size: 24px; line-height: 34px; font-weight: 700; letter-spacing: 0; }

/* ---- Dashboard stats: label, a large tabular figure, one quiet line ---- */
.fi-wi-stats-overview-stat { padding: 20px 24px; }
.fi-wi-stats-overview-stat-label { font-size: 14px; color: var(--mp-muted); }
.fi-wi-stats-overview-stat-value { font-size: 32px; line-height: 42px; font-weight: 700; color: var(--mp-navy); letter-spacing: 0; }
.fi-wi-stats-overview-stat-description { font-size: 12px; }

/* ---- Tables: quiet header, 52px rows, numbers aligned ---- */
.fi-ta-header-cell { background: #EEF0EC; font-size: 12px; font-weight: 700; color: var(--mp-muted); }
.fi-ta-row .fi-ta-cell { padding-block: 10px; }
.fi-ta-placeholder { color: var(--mp-muted) !important; }
.mp-num-cell .fi-ta-text-item { font-variant-numeric: tabular-nums; }

/* ---- Badges: status by lightness and icon ---- */
.fi-badge { border-radius: var(--mp-radius-sm); font-weight: 700; min-height: 24px; }
.mp-badge-missing .fi-badge { background: transparent; border: 1px solid var(--mp-line-strong); color: var(--mp-muted); }
.fi-badge.fi-color-overdue { box-shadow: none; --tw-ring-color: transparent; }
.fi-badge.fi-color-cancelled { background: transparent; text-decoration: line-through; box-shadow: inset 0 0 0 1px var(--mp-line-strong); }
.fi-badge.fi-color-gray:not(.fi-size-xs) { background: #fff; box-shadow: inset 0 0 0 1px var(--mp-line-strong); }

/* ---- Sign-in: navy page, white card, the mark on the card ---- */
.fi-simple-layout { background: var(--mp-navy); }
.fi-simple-main { border-radius: var(--mp-radius-lg) !important; box-shadow: var(--mp-float); padding: 40px 32px !important; max-width: 440px; }
.fi-simple-header-heading { font-size: 24px; letter-spacing: 0; }
.mp-login-note { margin-top: 8px; text-align: center; color: var(--mp-muted); font-size: 14px; }
.mp-login-note a { color: var(--mp-blue); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Phones: a smaller figure and tighter cards. */
@media (max-width: 639px) {
    .fi-wi-stats-overview-stat { padding: 16px; }
    .fi-wi-stats-overview-stat-value { font-size: 24px; line-height: 34px; }
}

/* WhatsApp field: the prefix list and the local number side by side, left to right. */
.mp-wa { display: flex; gap: 8px; direction: ltr; }
.mp-wa-prefix { flex: 0 0 112px; }
.mp-wa-local { flex: 1 1 auto; }
.mp-wa input { font-variant-numeric: tabular-nums; letter-spacing: .02em; }

/* Numbers to correct. */
.mp-fix-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.mp-fix-table th, .mp-fix-table td { padding: 8px 10px; text-align: start; border-bottom: 1px solid rgb(0 0 0 / .08); }
.mp-fix-table th { font-weight: 600; }

/* Phone numbers and references inside Arabic text keep their own order. */
.mp-ltr { direction: ltr; unicode-bidi: isolate; }
/* The prefix list is left to right inside the right-to-left panel: its arrow goes on the right, clear of +970. */
.mp-wa select.fi-select-input { direction: ltr; background-position: right .5rem center; padding-left: .75rem; padding-right: 2rem; }
