@import 'tailwindcss' source(none);
@import '../../../../vendor/filament/filament/resources/css/index.css';

@source '../../../../app/Filament/SuperAdmin/**/*.php';
@source '../../../../resources/views/filament/super-admin/**/*.blade.php';

@variant dark (&:where(.dark, .dark *));

/*
 * ============================================================
 * POS Kasir SaaS - Super Admin Theme
 * Design: Modern Professional + Indigo & White Palette
 * Strategy: UNLAYERED CSS (wins over Filament's @layer rules)
 * ============================================================
 */

@theme inline {
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif,
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, 'Liberation Mono', 'Courier New', monospace;
}

/* ==========================================================
   LOGIN PAGE - Indigo Gradient Background
   ========================================================== */

body {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 25%, #C7D2FE 50%, #A5B4FC 75%, #818CF8 100%) !important;
    min-height: 100vh !important;
}

html {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 25%, #C7D2FE 50%, #A5B4FC 75%, #818CF8 100%) !important;
}

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

.fi-simple-page::before {
    content: '';
    position: fixed;
    top: 20%;
    left: 20%;
    width: 24rem;
    height: 24rem;
    border-radius: 50%;
    background: radial-gradient(circle, #6366F1 0%, transparent 70%) !important;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

.fi-simple-page::after {
    content: '';
    position: fixed;
    bottom: 20%;
    right: 20%;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background: radial-gradient(circle, #818CF8 0%, transparent 70%) !important;
    opacity: 0.08;
    pointer-events: none;
    z-index: 0;
}

/* Login Card */
.fi-simple-main {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(199, 210, 254, 0.5) !important;
    border-radius: 1.25rem !important;
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.2),
                0 0 0 1px rgba(165, 180, 252, 0.1) !important;
}

/* ==========================================================
   MAIN LAYOUT - After Login (Royal Blue Gradient Sidebar)
   ========================================================== */

/* Override body background for authenticated pages to a beautiful soft blue-slate */
.fi-body:not(.fi-simple-page) body,
body:has(.fi-sidebar),
.fi-main,
main.fi-main {
    background: #F0F4F8 !important;
}

/* Sidebar - Royal Blue Gradient Theme */
.fi-sidebar,
.fi-sidebar.fi-main-sidebar,
aside.fi-sidebar {
    background: linear-gradient(180deg, #1E40AF 0%, #1E3A8A 100%) !important;
    background-color: #1E3A8A !important;
    border-right: 1px solid rgba(59, 130, 246, 0.15) !important;
    box-shadow: 4px 0 20px rgba(30, 58, 138, 0.08) !important;
}

/* Sidebar header area */
.fi-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.25rem 1rem !important;
    background: transparent !important;
}

/* Sidebar brand / logo text */
.fi-sidebar-header a,
.fi-sidebar-header span,
.fi-sidebar-header button {
    color: #FFFFFF !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
}

/* Ensure transparent backdrops for sidebar subcontainers */
.fi-sidebar > *,
.fi-sidebar > div,
.fi-sidebar-nav-groups,
.fi-sidebar-footer,
.fi-sidebar-group,
.fi-sidebar-group-items,
.fi-sidebar-item {
    background: transparent !important;
    background-color: transparent !important;
}

/* Sidebar nav items (Inactive) */
.fi-sidebar-item-btn,
.fi-sidebar-item a,
.fi-sidebar-item button,
.fi-sidebar-nav-flat-item a {
    color: rgba(255, 255, 255, 0.75) !important;
    border-radius: 0.625rem !important;
    margin: 0.125rem 0.5rem !important;
    padding: 0.625rem 0.875rem !important;
    transition: all 200ms ease !important;
    background: transparent !important;
    background-color: transparent !important;
}

.fi-sidebar-item-label,
.fi-sidebar-item-btn > span {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
}

/* Hover Inactive */
.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}
.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover .fi-sidebar-item-label,
.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover > span {
    color: #FFFFFF !important;
}
.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover .fi-icon,
.fi-sidebar-item.fi-sidebar-item-has-url > .fi-sidebar-item-btn:hover svg {
    color: #60A5FA !important;
}

/* Sidebar nav items (Active) */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-item-active a,
.fi-sidebar-item-active button,
.fi-sidebar-item a[aria-current="page"],
.fi-sidebar-nav-flat-item-active a {
    background: linear-gradient(90deg, #3B82F6 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > span {
    color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* Sidebar icons (Inactive) */
.fi-sidebar-item a svg,
.fi-sidebar-item button svg,
.fi-sidebar-nav-flat-item a svg,
.fi-sidebar-item-btn svg {
    color: rgba(255, 255, 255, 0.55) !important;
    transition: transform 200ms ease !important;
}

.fi-sidebar-item a:hover svg,
.fi-sidebar-item button:hover svg,
.fi-sidebar-item-btn:hover svg {
    transform: scale(1.05) !important;
    color: #FFFFFF !important;
}

/* Sidebar icons (Active) */
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn svg,
.fi-sidebar-item-active a svg,
.fi-sidebar-item-active button svg,
.fi-sidebar-item a[aria-current="page"] svg,
.fi-sidebar-nav-flat-item-active a svg {
    color: #FFFFFF !important;
}

/* Sidebar group labels */
.fi-sidebar-group-label,
.fi-sidebar-group button span {
    color: rgba(255, 255, 255, 0.4) !important;
    font-size: 0.6875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    font-weight: 600 !important;
}

/* Sidebar group chevron */
.fi-sidebar-group button svg {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Sidebar collapse/close button */
.fi-sidebar-close-btn,
.fi-sidebar button[x-on] {
    color: rgba(255, 255, 255, 0.7) !important;
}

.fi-sidebar-close-btn:hover,
.fi-sidebar button[x-on]:hover {
    color: #FFFFFF !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ==========================================================
   TOPBAR / HEADER
   ========================================================== */

.fi-topbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #E2E8F0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

/* ==========================================================
   CONTENT AREA
   ========================================================== */

.fi-page-header {
    margin-bottom: 1.5rem !important;
}

.fi-header-heading {
    font-weight: 700 !important;
    color: #1E293B !important;
    letter-spacing: -0.025em !important;
}

/* ==========================================================
   STATS WIDGETS (SaaS Overview Cards)
   ========================================================== */

.fi-wi-stats-overview-stat {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(219, 234, 254, 0.7) !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.03) !important;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow: hidden !important;
}

.fi-wi-stats-overview-stat:hover {
    border-color: rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 15px 30px -10px rgba(30, 58, 138, 0.08) !important;
    transform: translateY(-4px) scale(1.02) !important;
}

/* ==========================================================
   TABLES (SaaS Tenants, Subscriptions, Plans lists)
   ========================================================== */

.fi-ta-ctn,
.fi-ta-content {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(219, 234, 254, 0.7) !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.03) !important;
    overflow: hidden !important;
    transition: all 250ms ease !important;
}

.fi-ta-ctn:hover {
    box-shadow: 0 15px 30px -10px rgba(30, 58, 138, 0.05) !important;
}

.fi-ta-table {
    border: none !important;
    border-collapse: collapse !important;
}

.fi-ta-header-cell,
.fi-ta-table > thead > tr {
    background: #F8FAFC !important;
    border-bottom: 1px solid #EFF6FF !important;
    color: #6B7280 !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    font-size: 0.6875rem !important;
    letter-spacing: 0.05em !important;
}

.fi-ta-row {
    border-top: 1px solid #EFF6FF !important;
    transition: background-color 150ms ease !important;
}

.fi-ta-row:hover td,
.fi-ta-row:hover {
    background-color: rgba(239, 246, 255, 0.3) !important;
}

.fi-ta-col {
    color: #374151 !important;
    font-weight: 500 !important;
    font-size: 0.8125rem !important;
}

/* ==========================================================
   CARDS & SECTIONS
   ========================================================== */

.fi-section,
.fi-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(219, 234, 254, 0.7) !important;
    border-radius: 1rem !important;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.03) !important;
    overflow: hidden !important;
    transition: all 250ms ease !important;
}

.fi-section:hover,
.fi-card:hover {
    box-shadow: 0 15px 30px -10px rgba(30, 58, 138, 0.05) !important;
}

/* ==========================================================
   BUTTONS
   ========================================================== */

.fi-btn-primary,
button[type="submit"],
.fi-btn-color-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 700 !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
    transition: all 200ms ease !important;
    cursor: pointer !important;
}

.fi-btn-primary:hover,
button[type="submit"]:hover,
.fi-btn-color-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.3) !important;
}

.fi-btn-primary:active,
button[type="submit"]:active,
.fi-btn-color-primary:active {
    transform: translateY(0) !important;
}

/* ==========================================================
   BADGES
   ========================================================== */

.fi-badge {
    border-radius: 9999px !important;
    font-weight: 700 !important;
    font-size: 0.6875rem !important;
}

/* ==========================================================
   FORMS & INPUTS
   ========================================================== */

.fi-input-wrp {
    border-radius: 0.5rem !important;
    background-color: #FFFFFF !important;
    border: 1.5px solid #DBEAFE !important;
    box-shadow: 0 1px 2px rgba(30, 58, 138, 0.05) !important;
    transition: all 150ms ease !important;
}

.fi-input-wrp:focus-within {
    border-color: #3B82F6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
}

.fi-input {
    border-radius: 0.5rem !important;
    border: none !important;
    color: #1E3A8A !important;
    font-size: 0.875rem !important;
    background-color: transparent !important;
}

/* ==========================================================
   BREADCRUMBS
   ========================================================== */

.fi-breadcrumbs {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
}

.fi-breadcrumbs a {
    color: #64748B !important;
    transition: color 150ms !important;
}

.fi-breadcrumbs a:hover {
    color: #2563EB !important;
}

/* ==========================================================
   SCROLLBAR
   ========================================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}
