/* TailorHub — colorful admin panels (shop + platform) */
/* Served as a static overlay via a Filament HEAD_END render hook so it layers
   on top of the default Filament theme instead of replacing it. */

/* ── Sidebar ───────────────────────────────────────────── */
.fi-body .fi-sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15);
}

.fi-body .fi-sidebar-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.fi-body .fi-sidebar .fi-logo,
.fi-body .fi-sidebar .fi-sidebar-item-label,
.fi-body .fi-sidebar .fi-sidebar-group-label {
    color: #e2e8f0 !important;
}

.fi-body .fi-sidebar .fi-sidebar-item-btn > .fi-icon,
.fi-body .fi-sidebar .fi-sidebar-group-btn > .fi-icon {
    color: #94a3b8 !important;
}

.fi-body .fi-sidebar .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.fi-body .fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-left: 3px solid var(--darzi-nav-accent, #34d399);
    border-radius: 0 0.5rem 0.5rem 0;
}

.fi-body .fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-icon {
    color: var(--darzi-nav-accent, #34d399) !important;
}

.fi-body .fi-sidebar .fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: #fff !important;
    font-weight: 600;
}

/* Rotate accent colors per nav item */
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+1) { --darzi-nav-accent: #3b82f6; }
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+2) { --darzi-nav-accent: #f97316; }
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+3) { --darzi-nav-accent: #a855f7; }
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+4) { --darzi-nav-accent: #22c55e; }
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+5) { --darzi-nav-accent: #14b8a6; }
.fi-body .fi-sidebar-nav-groups > .fi-sidebar-group:nth-child(1) .fi-sidebar-item:nth-child(6n+6) { --darzi-nav-accent: #f43f5e; }

/* ── Stat cards: base look for every metric card ─────── */
.fi-wi-stats-overview-stat {
    border: none !important;
    border-radius: 0.85rem !important;
    box-shadow: 0 8px 22px -10px rgba(15, 23, 42, 0.35) !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.4) !important;
}

/* Semantic / palette variants — applied explicitly per stat in PHP */
.fi-wi-stats-overview-stat.darzi-stat--blue   { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--sky    { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--indigo { background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--purple { background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--pink   { background: linear-gradient(135deg, #ec4899 0%, #be185d 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--rose   { background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--red    { background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--orange { background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--amber  { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--green  { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--emerald{ background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--teal   { background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%) !important; }
.fi-wi-stats-overview-stat.darzi-stat--slate  { background: linear-gradient(135deg, #64748b 0%, #334155 100%) !important; }

/* White text on colored cards */
.fi-wi-stats-overview-stat.darzi-stat .fi-wi-stats-overview-stat-value,
.fi-wi-stats-overview-stat.darzi-stat .fi-icon {
    color: #ffffff !important;
}

.fi-wi-stats-overview-stat.darzi-stat .fi-wi-stats-overview-stat-label {
    color: rgba(255, 255, 255, 0.85) !important;
}

.fi-wi-stats-overview-stat.darzi-stat .fi-wi-stats-overview-stat-description {
    color: rgba(255, 255, 255, 0.8) !important;
}

.fi-wi-stats-overview-stat.darzi-stat a:hover {
    text-decoration: underline;
}

/* ── Chart & table widgets: clean cards, no colored border ─ */
.fi-wi-chart {
    border-radius: 0.85rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    background: #fff;
    padding: 0.5rem;
}

/* ── Onboarding widget ───────────────────────────────── */
.darzi-onboarding-card {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 60%);
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.darzi-onboarding-card .darzi-progress-track {
    background: #e2e8f0;
    border-radius: 9999px;
    height: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.darzi-onboarding-card .darzi-progress-bar {
    background: linear-gradient(90deg, #f97316, #ea580c);
    height: 8px;
    border-radius: 9999px;
}

/* ── Order board (Filament shop page) ────────────────── */
.darzi-board__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.darzi-board__hint {
    font-size: 1rem;
    color: #64748b;
}

.darzi-board__search {
    width: 100%;
    max-width: 18rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    background: #fff;
}

.dark .darzi-board__search {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.darzi-board__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .darzi-board__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .darzi-board__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.darzi-col {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: #f9fafb;
    padding: 0.75rem;
}

.dark .darzi-col {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.1);
}

.darzi-col__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding: 0 0.25rem;
}

.darzi-col__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.darzi-col__dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    display: inline-block;
}

.darzi-col__count {
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
}

.darzi-col__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.darzi-col.is-drop-target {
    outline: 2px solid #f59e0b;
    outline-offset: -2px;
}

.darzi-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.875rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: grab;
}

.darzi-card:active { cursor: grabbing; }

.dark .darzi-card {
    background: #111827;
    border-color: rgba(255, 255, 255, 0.1);
}

.darzi-card__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.darzi-card__ref {
    font-size: 0.875rem;
    font-family: ui-monospace, monospace;
    color: #6b7280;
}

.darzi-card__name {
    font-weight: 600;
    font-size: 1rem;
}

.darzi-card__date {
    font-size: 0.8125rem;
    color: #6b7280;
    white-space: nowrap;
}

.darzi-card__items {
    font-size: 0.9375rem;
    color: #4b5563;
    margin: 0 0 0.5rem;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.dark .darzi-card__items { color: #d1d5db; }

.darzi-card__progress {
    height: 0.375rem;
    background: #f3f4f6;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .darzi-card__progress { background: rgba(255, 255, 255, 0.1); }

.darzi-card__progress > span {
    display: block;
    height: 100%;
    border-radius: 9999px;
}

.darzi-card__progress-label {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.darzi-card__moves {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.darzi-move-btn {
    font-size: 0.8125rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    background: transparent;
    cursor: pointer;
}

.darzi-move-btn:hover { background: #f9fafb; }

.dark .darzi-move-btn {
    border-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}

.dark .darzi-move-btn:hover { background: rgba(255, 255, 255, 0.05); }

.darzi-col__empty {
    font-size: 0.9375rem;
    color: #6b7280;
    text-align: center;
    padding: 2rem 0.5rem;
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
}

/* ── Booking detail panels (platform + shop view page) ── */
.darzi-bk__panel {
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-top: 1rem;
}

.darzi-bk__panel:first-child { margin-top: 0; }

.dark .darzi-bk__panel { border-color: rgba(255, 255, 255, 0.1); }

.darzi-bk__head {
    background: #f9fafb;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.dark .darzi-bk__head { background: rgba(255, 255, 255, 0.05); }

.darzi-bk__grid {
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.darzi-bk__grid > [data-section='qameez'] { order: 1; }
.darzi-bk__grid > [data-section='coat_sherwani'] { order: 2; }
.darzi-bk__grid > [data-section='shalwar_pant'] { order: 3; }

@media (min-width: 768px) {
    .darzi-bk__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .darzi-bk__grid > [data-section='coat_sherwani'] { order: 1; }
    .darzi-bk__grid > [data-section='shalwar_pant'] { order: 2; }
    .darzi-bk__grid > [data-section='qameez'] { order: 3; }
}

.darzi-bk__section {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    font-size: 0.875rem;
}

.dark .darzi-bk__section { border-color: rgba(255, 255, 255, 0.1); }

.darzi-bk__section-head {
    background: #f3f4f6;
    padding: 0.375rem 0.5rem;
    font-weight: 500;
    text-align: center;
}

.dark .darzi-bk__section-head { background: rgba(255, 255, 255, 0.05); }

.darzi-bk table { width: 100%; border-collapse: collapse; }

.darzi-bk__section td { padding: 0.25rem 0.5rem; }

.darzi-bk__section tr { border-bottom: 1px solid #f3f4f6; }

.dark .darzi-bk__section tr { border-color: rgba(255, 255, 255, 0.08); }

.darzi-bk__label { color: #4b5563; }

.darzi-bk__val { text-align: center; font-weight: 600; width: 4rem; }

.darzi-bk__data th {
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    font-weight: 600;
}

.dark .darzi-bk__data th { background: rgba(255, 255, 255, 0.05); }

.darzi-bk__data td {
    padding: 0.5rem 0.75rem;
    border-top: 1px solid #f3f4f6;
}

.dark .darzi-bk__data td { border-color: rgba(255, 255, 255, 0.08); }

.darzi-bk__data .t-center { text-align: center; }
.darzi-bk__data .t-start { text-align: left; }
.darzi-bk__data .t-end { text-align: right; }

.darzi-bk__empty { padding: 1rem; font-size: 0.875rem; color: #6b7280; }

.darzi-badge {
    display: inline-flex;
    border-radius: 9999px;
    padding: 0.05rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.darzi-badge--ok { background: #d1fae5; color: #065f46; }
.darzi-badge--pending { background: #fef3c7; color: #92400e; }
