/* Bakery Theme for Filament - Updated Version */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Root Variables */
:root {
    --bakery-cream: #fafafa;
    --bakery-wheat: #f0e9d8;
    --bakery-brown: #8b4513;
    --bakery-crust: #e8dcc8;
    --bakery-espresso: #3c2415;
    --bakery-vanilla: #ffffff;
    --bakery-caramel: #cd853f;
    color-scheme: only light !important;
}

html, body {
    color-scheme: only light !important;
    background: #fafafa !important;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light !important;
    }
}

body {
    background: #ffffff;
    font-family: 'Inter', sans-serif;
}

/* Sidebar - โทนสีครีมอุ่น ๆ เหมือนพื้นโลโก้ */
.fi-sidebar {
    background: #ffffff !important;
    border-right: 3px solid #d4b896 !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08) !important;
}

/* Sidebar Header - พื้นหลังสีเดียวกับ Sidebar */
.fi-sidebar-header {
    flex-shrink: 0 !important;
    overflow: visible !important;
    min-height: fit-content !important;
    padding: 1.5rem 1rem !important;
    background: #ffffff !important;
    border-bottom: 2px solid #d4b896 !important;
}

/* Logo Container */
.fi-logo {
    padding: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    height: auto !important;
    min-height: fit-content !important;
}

/* Logo Image - มุมโค้งมนและแสดงเต็ม */
.fi-logo img {
    max-height: 4rem !important;
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
    padding: 8px !important;
}

/* Logo เมื่อ Sidebar ย่อ */
.fi-sidebar-collapsed .fi-logo img {
    max-height: 2.5rem !important;
    border-radius: 8px !important;
}

/* Sidebar Navigation */
.fi-sidebar-nav {
    overflow-y: auto !important;
    overflow-x: visible !important;
}

/* เมนูด้านซ้าย - ตัวอักษรสีน้ำตาลเข้มชัดเจน */
.fi-sidebar-nav-item {
    margin: 4px 12px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.fi-sidebar-nav-item:hover {
    background: rgba(205, 133, 63, 0.1) !important;
}

.fi-sidebar-nav-item-label {
    color: #5e4134 !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    font-size: 0.9rem !important;
}

.fi-sidebar-item-icon {
    color: #854442 !important;
    filter: none !important;
}

/* สถานะ Active - ใช้พื้นหลังสีอ่อนแทนเส้นขอบ */
.fi-sidebar-nav-item-active {
    background: rgba(205, 133, 63, 0.15) !important;
    border-radius: 8px !important;
    /* ลบ border-left และ padding-left ออก */
}

.fi-sidebar-nav-item-active .fi-sidebar-nav-item-label {
    color: #5e4134 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
}

.fi-sidebar-nav-item-active .fi-sidebar-item-icon {
    color: #854442 !important;
    filter: none !important;
}


.fi-sidebar-group-label {
    color: #3c2415 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
}

.fi-sidebar-group-icon {
    color: #854442 !important;
    filter: none !important;
}

/* Header */
.fi-topbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

/* Main Content */
.fi-main {
    background: #ffffff !important;
}

/* Cards */
.fi-section {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Table - สีขาวบริสุทธิ์ */
.fi-ta-table {
    background: #ffffff !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.fi-ta-header-cell {
    background: #f9fafb !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #e5e7eb !important;
}

.fi-ta-cell {
    color: #374151 !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.fi-ta-row {
    background: #ffffff !important;
}

.fi-ta-row:hover .fi-ta-cell {
    background: #f9fafb !important;
    color: #1f2937 !important;
}

.fi-ta-text {
    color: #1f2937 !important;
}

/* Forms */
.fi-input {
    border: 2px solid #e5e7eb !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #1f2937 !important;
}

.fi-input:focus {
    border-color: var(--bakery-brown) !important;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1) !important;
}

.fi-input::placeholder {
    color: #9ca3af !important;
}

.fi-input-wrapper input {
    color: #1f2937 !important;
    background: #ffffff !important;
}

/* Buttons */
.fi-btn-primary {
    background: linear-gradient(135deg, var(--bakery-brown), var(--bakery-caramel)) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
}

.fi-btn-primary:hover {
    background: linear-gradient(135deg, var(--bakery-caramel), var(--bakery-brown)) !important;
}

/* Badges */
.fi-badge {
    border-radius: 6px !important;
    font-weight: 600 !important;
}

.fi-badge-color-success {
    background: #10b981 !important;
    color: white !important;
}

.fi-badge-color-warning {
    background: #f59e0b !important;
    color: white !important;
}

.fi-badge-color-danger {
    background: #ef4444 !important;
    color: white !important;
}

.fi-badge-color-info {
    background: #3b82f6 !important;
    color: white !important;
}

/* Links */
.fi-link {
    color: #2563eb !important;
}

.fi-link:hover {
    color: #1d4ed8 !important;
}

/* Breadcrumb */
.fi-breadcrumbs-item-label {
    color: #6b7280 !important;
}

.fi-breadcrumbs-item-label:hover {
    color: var(--bakery-brown) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Mobile */
@media (max-width: 768px) {
    .fi-sidebar {
        background: #ffffff !important;
    }
    
    .fi-logo img {
        max-height: 3rem !important;
    }
}
