/* NetSahibi Shop Admin — Light, Colorful, Symmetric */

:root {
    --ns-orange: #f97316;
    --ns-orange-light: #fff7ed;
    --ns-orange-border: #fed7aa;
    --ns-navy: #0f172a;
    --ns-blue: #2563eb;
    --ns-surface: #f8fafc;
    --ns-card: #ffffff;
    --ns-border: #e2e8f0;
    --ns-border-light: #f1f5f9;
    --ns-text: #1e293b;
    --ns-muted: #64748b;
    --ns-sidebar: #ffffff;
    --ns-radius: 12px;
    --ns-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --ns-shadow-md: 0 4px 16px rgba(15, 23, 42, 0.06);
}

/* ── Base & main area ── */
.fi-body {
    background: var(--ns-surface) !important;
}

.fi-main {
    background: var(--ns-surface) !important;
}

.fi-main-ctn {
    padding: 1.25rem 1.5rem 2rem !important;
}

@media (min-width: 1024px) {
    .fi-main-ctn {
        padding: 1.5rem 2rem 2.5rem !important;
    }
}

/* ── Sidebar: light & clean ── */
.fi-sidebar {
    background: var(--ns-sidebar) !important;
    border-right: 1px solid var(--ns-border) !important;
    box-shadow: 2px 0 12px rgba(15, 23, 42, 0.03) !important;
}

.fi-sidebar-header {
    border-bottom: 1px solid var(--ns-border-light) !important;
    padding: 1.125rem 1.25rem !important;
    background: linear-gradient(180deg, #fff 0%, #fafbfc 100%) !important;
}

.fi-sidebar-header .fi-logo {
    font-weight: 800 !important;
    font-size: 1rem !important;
    letter-spacing: -0.03em !important;
    background: linear-gradient(135deg, var(--ns-navy) 0%, var(--ns-orange) 100%);
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

.fi-sidebar-nav-groups {
    gap: 0.125rem !important;
    padding: 0.75rem 0.625rem 1.5rem !important;
}

/* Kontrol Merkezi — tek başına menü başlığı gibi */
.fi-sidebar-nav-groups > .fi-sidebar-group:first-child .fi-sidebar-group-label,
.fi-sidebar-nav-groups > .fi-sidebar-group:first-child .fi-sidebar-group-collapse-button {
    display: none !important;
}

.fi-sidebar-nav-groups > .fi-sidebar-group:first-child {
    margin-bottom: 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ns-border-light);
}

.fi-sidebar-nav-groups > .fi-sidebar-group:first-child .fi-sidebar-item a,
.fi-sidebar-nav-groups > .fi-sidebar-group:first-child .fi-sidebar-item button {
    font-size: 0.875rem !important;
    font-weight: 700 !important;
    padding: 0.625rem 0.875rem !important;
}

.fi-sidebar-group-label {
    color: var(--ns-muted) !important;
    font-size: 0.625rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    padding: 0.875rem 0.75rem 0.375rem !important;
}

.fi-sidebar-item a,
.fi-sidebar-item button {
    border-radius: 10px !important;
    margin: 2px 0 !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.15s ease !important;
}

.fi-sidebar-item a:hover,
.fi-sidebar-item button:hover {
    background: var(--ns-orange-light) !important;
    color: #c2410c !important;
}

.fi-sidebar-item-active a,
.fi-sidebar-item-active button {
    background: var(--ns-orange-light) !important;
    color: var(--ns-orange) !important;
    font-weight: 600 !important;
    border-left: none !important;
    box-shadow: inset 3px 0 0 var(--ns-orange) !important;
}

.fi-sidebar-item-icon {
    color: inherit !important;
    opacity: 0.85;
}

/* ── Top bar ── */
.fi-topbar {
    background: var(--ns-card) !important;
    border-bottom: 1px solid var(--ns-border) !important;
    box-shadow: var(--ns-shadow) !important;
    min-height: 3.5rem !important;
}

.fi-topbar::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--ns-orange) 0%, #fb923c 50%, var(--ns-blue) 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

/* ── Topbar date/time (left of notifications) ── */
.ns-topbar-datetime {
    display: none;
    align-items: center;
    gap: 0.375rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .ns-topbar-datetime {
        display: flex;
    }
}

.ns-tbd-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    padding: 0.3125rem 0.625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ns-tbd-icon {
    width: 0.875rem !important;
    height: 0.875rem !important;
    flex-shrink: 0;
}

.ns-tbd-chip--date {
    background: linear-gradient(135deg, #fff7ed, #ffffff);
    color: #c2410c;
    border-color: #fed7aa;
}

.ns-tbd-chip--time {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    color: #1d4ed8;
    border-color: #bfdbfe;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.ns-tbd-chip--site {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    color: #15803d;
    border-color: #bbf7d0;
}

.ns-tbd-chip--site:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.15);
}

@media (min-width: 1024px) {
    .ns-tbd-chip {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
}

/* ── Page headers ── */
.fi-header {
    margin-bottom: 0.5rem !important;
}

.fi-header-heading {
    font-weight: 700 !important;
    font-size: 1.375rem !important;
    letter-spacing: -0.03em !important;
    color: var(--ns-navy) !important;
}

.fi-header-subheading {
    color: var(--ns-muted) !important;
    font-size: 0.875rem !important;
}

/* ── Cards, sections, tables ── */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-fo-component-ctn {
    border-radius: var(--ns-radius) !important;
    border: 1px solid var(--ns-border) !important;
    box-shadow: var(--ns-shadow) !important;
    background: var(--ns-card) !important;
}

.fi-section-header {
    border-bottom: 1px solid var(--ns-border-light) !important;
    padding: 1rem 1.25rem !important;
    background: #fafbfc !important;
    border-radius: var(--ns-radius) var(--ns-radius) 0 0 !important;
}

.fi-section-header-heading {
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    color: var(--ns-navy) !important;
}

.fi-section-content {
    padding: 1.25rem !important;
}

/* ── Dashboard grid layout ── */
.fi-dashboard-page .fi-main-ctn {
    padding-top: 1rem !important;
}

.ns-dashboard-grid,
.fi-dashboard-page .fi-wi {
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.fi-dashboard-page .fi-wi > .fi-wi-widget {
    width: 100% !important;
    max-width: 100% !important;
}

/* Dashboard: tek sütun — yan yana grid kayma/overflow yapıyordu */
.fi-dashboard-page .fi-wi-widget {
    min-width: 0 !important;
}

.fi-dashboard-page .fi-wi-table-widget .fi-ta-ctn,
.fi-dashboard-page .fi-wi-table-widget .fi-ta-content {
    max-width: 100% !important;
    overflow-x: auto !important;
}

.fi-dashboard-page .fi-wi-chart {
    max-width: 100% !important;
    overflow: hidden !important;
}

.fi-dashboard-page .fi-wi-widget {
    height: auto;
}

/* Flatten custom widgets — remove double card wrapper */
.fi-dashboard-page .fi-wi-widget:has(.ns-dash-header) .fi-section,
.fi-dashboard-page .fi-wi-widget:has(.ns-alert-strip) .fi-section {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.fi-dashboard-page .fi-wi-widget:has(.ns-dash-header) .fi-section-content,
.fi-dashboard-page .fi-wi-widget:has(.ns-alert-strip) .fi-section-content {
    padding: 0 !important;
}

/* Stats widget — single clean row */
.fi-dashboard-page .fi-wi-stats-overview .fi-section {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.fi-dashboard-page .fi-wi-stats-overview .fi-section-content {
    padding: 0 !important;
}

.fi-dashboard-page .fi-wi-widget .fi-section {
    height: auto;
    display: flex;
    flex-direction: column;
}

.fi-dashboard-page .fi-wi-widget .fi-section-content {
    flex: 1;
}

/* ── Stats: 4-column symmetric row ── */
.fi-wi-stats-overview-stats {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.75rem !important;
}

@media (min-width: 768px) {
    .fi-wi-stats-overview-stats {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

.fi-wi-stats-overview-stat {
    padding: 0.875rem 1rem !important;
    min-height: 4.75rem !important;
    text-align: left !important;
    align-items: flex-start !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.fi-wi-stats-overview-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--ns-shadow-md) !important;
}

.fi-wi-stats-overview-stat-value {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums !important;
    color: var(--ns-navy) !important;
}

.fi-wi-stats-overview-stat-label {
    font-size: 0.6875rem !important;
    font-weight: 600 !important;
    color: var(--ns-muted) !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fi-wi-stats-overview-stat-description {
    font-size: 0.6875rem !important;
    color: #94a3b8 !important;
}

/* ── Tables ── */
.fi-ta-header-cell {
    background: #f8fafc !important;
    font-size: 0.6875rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.06em !important;
    color: var(--ns-muted) !important;
    padding: 0.75rem 1rem !important;
}

.fi-ta-cell {
    padding: 0.75rem 1rem !important;
    font-size: 0.8125rem !important;
    color: var(--ns-text) !important;
    border-bottom: 1px solid var(--ns-border-light) !important;
}

.fi-ta-row:hover .fi-ta-cell {
    background: #fafbfc !important;
}

/* ── Dashboard: hide duplicate page title ── */
.fi-dashboard-page .fi-header {
    display: none !important;
}

/* ── Welcome banner (light NetSahibi) ── */
.ns-dash-header {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 45%, #eff6ff 100%);
    border-radius: var(--ns-radius);
    padding: 1.5rem 1.75rem;
    color: var(--ns-navy);
    border: 1px solid var(--ns-orange-border);
    box-shadow: var(--ns-shadow);
    position: relative;
    overflow: hidden;
}

.ns-dash-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -20px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.ns-dash-header h1 {
    font-size: 1.625rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    color: var(--ns-navy);
    line-height: 1.2;
}

.ns-dash-header p {
    color: var(--ns-muted);
    font-size: 0.9375rem;
    margin: 0.5rem 0 0;
    max-width: 38rem;
    line-height: 1.5;
}

.ns-dash-header .ns-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3125rem 0.875rem;
    background: white;
    color: var(--ns-orange);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 999px;
    margin-bottom: 0.625rem;
    border: 1px solid var(--ns-orange-border);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ns-live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
    animation: ns-pulse 2s ease-in-out infinite;
}

@keyframes ns-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.ns-dash-meta {
    text-align: left;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--ns-border);
    border-radius: 10px;
    min-width: 10rem;
}

@media (min-width: 1024px) {
    .ns-dash-meta {
        text-align: right;
    }
}

.ns-dash-header .ns-time {
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
    color: var(--ns-muted);
    font-weight: 500;
}

.ns-dash-header .ns-time--clock {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--ns-navy);
    margin-top: 0.125rem;
    letter-spacing: -0.02em;
}

.ns-store-url {
    margin-top: 0.5rem;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ns-orange);
    letter-spacing: 0.02em;
}

.ns-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.625rem;
    margin-top: 1.25rem;
}

@media (min-width: 640px) {
    .ns-action-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .ns-action-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.ns-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 0.5rem;
    background: white;
    border: 1px solid var(--ns-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.15s ease;
    text-align: center;
}

.ns-action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ns-shadow-md);
}

.ns-action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
}

.ns-action-label {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--ns-text);
    line-height: 1.2;
}

.ns-action-card--orange .ns-action-icon { background: #fff7ed; color: #ea580c; }
.ns-action-card--orange:hover { border-color: #fed7aa; }

.ns-action-card--blue .ns-action-icon { background: #eff6ff; color: #2563eb; }
.ns-action-card--blue:hover { border-color: #bfdbfe; }

.ns-action-card--violet .ns-action-icon { background: #f5f3ff; color: #7c3aed; }
.ns-action-card--violet:hover { border-color: #ddd6fe; }

.ns-action-card--green .ns-action-icon { background: #f0fdf4; color: #16a34a; }
.ns-action-card--green:hover { border-color: #bbf7d0; }

.ns-action-card--slate .ns-action-icon { background: #f8fafc; color: #475569; }
.ns-action-card--slate:hover { border-color: #cbd5e1; }

/* legacy pills - keep for compatibility */
.ns-dash-header .ns-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.ns-dash-header .ns-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: white;
    border: 1px solid var(--ns-border);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ns-text);
    text-decoration: none;
    transition: all 0.15s ease;
}

.ns-dash-header .ns-pill:hover {
    border-color: var(--ns-orange);
    color: var(--ns-orange);
    background: var(--ns-orange-light);
}

/* ── Setup guide ── */
.ns-setup-guide {
    background: var(--ns-card);
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--ns-shadow);
}

.ns-setup-guide h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ns-navy);
    margin: 0;
}

.ns-setup-guide .ns-progress {
    height: 8px;
    background: var(--ns-border-light);
    border-radius: 999px;
    overflow: hidden;
}

.ns-setup-guide .ns-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ns-orange), #fb923c);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.ns-setup-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (min-width: 768px) {
    .ns-setup-steps { grid-template-columns: repeat(5, 1fr); }
}

.ns-setup-step {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--ns-border);
    background: #fafbfc;
    text-decoration: none;
    color: var(--ns-text);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.ns-setup-step:hover {
    border-color: var(--ns-orange-border);
    background: var(--ns-orange-light);
}

.ns-setup-step.done {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.ns-setup-step .ns-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 800;
    flex-shrink: 0;
    background: var(--ns-border);
    color: var(--ns-muted);
}

.ns-setup-step.done .ns-num {
    background: #22c55e;
    color: white;
}

/* ── Inline setup (inside welcome banner) ── */
.ns-setup-inline {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--ns-orange-border);
    position: relative;
    z-index: 1;
}

.ns-setup-inline__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.ns-setup-inline__title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--ns-navy);
}

.ns-setup-inline__count {
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--ns-orange);
    background: white;
    border: 1px solid var(--ns-orange-border);
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
}

.ns-setup-inline .ns-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--ns-orange-border);
}

.ns-setup-inline .ns-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--ns-orange), #fb923c);
    border-radius: 999px;
}

.ns-setup-inline__cta {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ns-orange);
    text-decoration: none;
}

.ns-setup-inline__cta:hover {
    text-decoration: underline;
}

/* ── Alert strip ── */
.ns-alert-strip {
    background: var(--ns-card);
    border: 1px solid var(--ns-border);
    border-radius: var(--ns-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--ns-shadow);
}

.ns-alert-strip__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.ns-alert-strip__head h3 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--ns-navy);
}

.ns-alert-strip__hint {
    font-size: 0.6875rem;
    color: var(--ns-muted);
}

/* ── Alert cards ── */
.ns-alert-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (min-width: 768px) {
    .ns-alert-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1024px) {
    .ns-alert-grid { grid-template-columns: repeat(6, 1fr); }
}

.ns-alert-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--ns-border);
    background: #fafbfc;
    text-decoration: none;
    color: inherit;
    text-align: center;
    min-height: 4.25rem;
    transition: all 0.15s ease;
}

.ns-alert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ns-shadow-md);
}

.ns-alert-card .ns-count {
    font-size: 1.75rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.ns-alert-card .ns-label {
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--ns-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ns-alert-card.warning { border-color: #fde68a; background: #fffbeb; }
.ns-alert-card.warning .ns-count { color: #d97706; }
.ns-alert-card.danger { border-color: #fecaca; background: #fef2f2; }
.ns-alert-card.danger .ns-count { color: #dc2626; }
.ns-alert-card.info { border-color: #bfdbfe; background: #eff6ff; }
.ns-alert-card.info .ns-count { color: #2563eb; }
.ns-alert-card.success { border-color: #bbf7d0; background: #f0fdf4; }
.ns-alert-card.success .ns-count { color: #16a34a; }

/* ── Quick actions ── */
.ns-quick-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ns-muted);
    margin: 1.25rem 0 0.625rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--ns-border-light);
}

.ns-quick-section-title:first-child {
    margin-top: 0;
}

.ns-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.625rem;
}

@media (min-width: 640px) {
    .ns-quick-grid { grid-template-columns: repeat(4, 1fr); }
}

.ns-quick-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--ns-border);
    background: #fafbfc;
    text-decoration: none;
    color: var(--ns-text);
    transition: all 0.15s ease;
    min-height: 5rem;
    text-align: center;
}

.ns-quick-tile:hover {
    border-color: var(--ns-orange);
    background: var(--ns-orange-light);
    color: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.1);
}

.ns-quick-tile .ns-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--ns-orange);
}

.ns-quick-tile span {
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
}

/* ── Integration badges ── */
.ns-integration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .ns-integration-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1280px) {
    .ns-integration-grid { grid-template-columns: repeat(5, 1fr); }
}

.ns-int-badge {
    padding: 0.625rem 0.5rem;
    border-radius: 10px;
    border: 1px solid var(--ns-border);
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    background: #fafbfc;
}

.ns-int-badge.active {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.ns-int-badge.partial {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.ns-int-badge.inactive {
    background: #f8fafc;
    border-color: var(--ns-border);
    color: #94a3b8;
}

/* ── Forms & buttons ── */
.fi-fo-field-wrp label {
    font-size: 0.8125rem !important;
    font-weight: 600 !important;
    color: var(--ns-text) !important;
}

.fi-input-wrp {
    border-radius: 10px !important;
    border-color: var(--ns-border) !important;
}

.fi-btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.fi-btn-color-primary {
    background: var(--ns-orange) !important;
}

.fi-tabs-item-active {
    color: var(--ns-orange) !important;
}

/* ── Login page ── */
.fi-simple-layout {
    background: linear-gradient(135deg, #fff7ed 0%, #f8fafc 50%, #eff6ff 100%) !important;
}

.fi-simple-main-ctn {
    background: transparent !important;
}

.fi-simple-page {
    background: var(--ns-card) !important;
    border: 1px solid var(--ns-border) !important;
    border-radius: 16px !important;
    box-shadow: var(--ns-shadow-md) !important;
    padding: 2rem !important;
}

.fi-simple-page::before {
    content: 'NS';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--ns-navy), var(--ns-orange));
    color: white;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 12px;
    margin: 0 auto 1.25rem;
}

.fi-simple-header-heading {
    font-weight: 800 !important;
    color: var(--ns-navy) !important;
    text-align: center !important;
}

/* ── Widget wrappers ── */
.fi-wi {
    border-radius: var(--ns-radius) !important;
}

/* ── Chart widget height fix ── */
.fi-wi-chart canvas {
    max-height: 280px !important;
}

/* ── Resource pages: prevent nested/clipped scrollbars ── */
.fi-resource-list-records-page .fi-main,
.fi-resource-list-records-page .fi-main-ctn,
.fi-resource-create-record-page .fi-main-ctn,
.fi-resource-edit-record-page .fi-main-ctn {
    overflow: visible !important;
    max-width: 100% !important;
}

.fi-page .fi-page-main,
.fi-page .fi-page-content {
    overflow: visible !important;
    max-width: 100% !important;
}

/* Table: horizontal scroll inside card, not page overflow */
.fi-resource-list-records-page .fi-ta-ctn {
    overflow: hidden !important;
    max-width: 100% !important;
}

.fi-ta-ctn {
    overflow: hidden !important;
    max-width: 100% !important;
}

.fi-ta-content {
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.fi-ta-table-ctn,
.fi-ta-header-ctn {
    overflow: visible !important;
}

.fi-ta-content .fi-dropdown-panel,
.fi-ta-content .fi-select-input-options,
.fi-ta-content .choices__list--dropdown {
    z-index: 60 !important;
}

/* ── Modern create/edit form layout ── */
.fi-resource-create-record-page .fi-fo-component-ctn,
.fi-resource-edit-record-page .fi-fo-component-ctn {
    gap: 1.25rem !important;
}

.ns-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .ns-form-sidebar {
        position: sticky;
        top: 1.5rem;
        align-self: start;
    }
}

.ns-form-sidebar .fi-section {
    border-color: var(--ns-orange-border) !important;
}

.ns-form-sidebar .fi-section-header {
    background: linear-gradient(180deg, #fff7ed 0%, #fafbfc 100%) !important;
}

.fi-resource-create-record-page .fi-section-description,
.fi-resource-edit-record-page .fi-section-description {
    color: var(--ns-muted) !important;
    font-size: 0.8125rem !important;
}

.fi-resource-create-record-page .fi-section .fi-section-header-heading,
.fi-resource-edit-record-page .fi-section .fi-section-header-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-resource-create-record-page .fi-form-actions,
.fi-resource-edit-record-page .fi-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: rgba(248, 250, 252, 0.95) !important;
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--ns-border-light);
    padding: 1rem 0 !important;
    margin-top: 0.5rem;
}

/* ── Responsive layout: no page-level horizontal scroll ── */
.fi-body,
.fi-layout {
    overflow-x: hidden !important;
}

.fi-main,
.fi-main-ctn,
.fi-page,
.fi-page-main,
.fi-page-content {
    min-width: 0 !important;
    max-width: 100% !important;
}

/* Large screens (27"+): table fits without horizontal scroll */
@media (min-width: 1536px) {
    .fi-resource-list-records-page .fi-ta-content {
        overflow-x: visible !important;
    }

    .fi-ta-table {
        width: 100% !important;
        table-layout: auto !important;
    }
}

/* Medium screens (15" laptops): compact table, fewer columns via PHP + tighter cells */
@media (max-width: 1535px) {
    .fi-ta-header-cell,
    .fi-ta-cell {
        padding: 0.5rem 0.625rem !important;
        font-size: 0.75rem !important;
    }

    .fi-ta-text-input-column input {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 5.5rem !important;
        padding: 0.25rem 0.375rem !important;
        font-size: 0.75rem !important;
    }

    .fi-ta-select-column .fi-input-wrp,
    .fi-ta-select-column .fi-select-input {
        max-width: 7.5rem !important;
        min-width: 0 !important;
    }

    .fi-ta-actions-cell {
        padding-left: 0.375rem !important;
        padding-right: 0.375rem !important;
    }
}

/* Small screens: stack form sidebar below main fields */
@media (max-width: 1023px) {
    .ns-form-sidebar {
        position: static !important;
    }

    .fi-resource-create-record-page .fi-fo-component-ctn,
    .fi-resource-edit-record-page .fi-fo-component-ctn {
        gap: 1rem !important;
    }
}

/* Select / dropdown panels — viewport-aware, no horizontal scroll */
.fi-select-input-options,
.fi-dropdown-panel,
.choices__list--dropdown,
.fi-select-list {
    max-width: min(calc(100vw - 2rem), 28rem) !important;
    max-height: min(50vh, 22rem) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    word-break: break-word;
}

.ns-responsive-select .fi-select-input-options,
.ns-responsive-select .choices__list--dropdown {
    width: 100% !important;
    max-width: min(calc(100vw - 3rem), 36rem) !important;
}

/* Table filter dropdown — align to viewport on small screens */
.fi-ta-filters-dropdown .fi-dropdown-panel,
.fi-ta-header-toolbar .fi-dropdown-panel {
    max-width: min(calc(100vw - 2rem), 24rem) !important;
}

/* SelectColumn row dropdown — float above table, not clipped */
.fi-ta-select-column .fi-dropdown-panel,
.fi-ta-select-column .fi-select-input-options {
    z-index: 70 !important;
    max-width: min(calc(100vw - 2rem), 16rem) !important;
}
