@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #09090b;
    --surface-color: rgba(24, 24, 27, 0.7);
    --surface-hover: rgba(39, 39, 42, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --text-color: #fafafa;
    --text-muted: #a1a1aa;
    --primary-color: #f97316;
    --primary-hover: #ea580c;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Light animation background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1) 0%, transparent 50%);
    animation: pulse 15s linear infinite alternate;
    z-index: -1;
    pointer-events: none;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(5%, 5%); }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #18181b;
}
::-webkit-scrollbar-thumb {
    background: #3f3f46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #52525b;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Navigation Bar (3 Floating Boxes: Logo, Menu, User/Settings) */
.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: calc(100% - 48px);
    max-width: 1400px;
    margin: 20px auto 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 100;
}

.nav-box {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.logo-box {
    padding: 8px 16px;
    flex-shrink: 0;
}

.brand {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: -0.01em;
}

.brand-icon {
    color: var(--primary-color);
    font-size: 18px;
}

.menu-box {
    padding: 5px 8px;
    flex: 1;
    justify-content: center;
    max-width: fit-content;
    margin: 0 auto;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 3px;
    align-items: center;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-menu::-webkit-scrollbar { display: none; }

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
}

.nav-link i {
    font-size: 14px;
}

.nav-link:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.user-box {
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
}

.nav-action-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
}

.nav-action-btn.logout-btn {
    color: var(--danger-color);
}

.nav-action-btn.logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 8px;
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-user-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    position: relative;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    z-index: 1;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 0 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

/* Mobile Bottom Nav */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: max(24px, env(safe-area-inset-bottom));
    left: 16px;
    width: calc(100% - 32px);
    background: rgba(24, 24, 27, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    z-index: 1000;
    box-sizing: border-box;
    overflow: hidden;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 16px;
    display: flex;
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, black 24px, black calc(100% - 24px), transparent 100%);
}
.mobile-nav ul::-webkit-scrollbar {
    display: none;
}

.mobile-nav ul::after {
    content: '';
    flex: 0 0 16px;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    gap: 4px;
    min-width: 60px;
}

.mobile-nav-link i {
    font-size: 22px;
}

.mobile-nav-link.active {
    color: var(--primary-color);
}

/* Cards */
.card {
    background: rgba(24, 24, 27, 0.35);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Forms & Buttons */
.btn {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: rgba(24, 24, 27, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(24, 24, 27, 0.5);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

.mobile-header {
    display: none;
}

.stat-label {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
    line-height: 1.2;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon {
    font-size: 24px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.quick-actions-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .top-nav-bar {
        display: none !important;
    }
    
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        border-radius: 14px;
        position: sticky;
        top: 16px;
        margin: 16px;
        z-index: 1000;
    }

    .mobile-header::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(24, 24, 27, 0.35);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 14px;
        z-index: -1;
        pointer-events: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .content-wrapper {
        padding: 12px;
        padding-bottom: 110px; /* Space for floating mobile nav */
    }

    body {
        font-size: 13px;
    }

    .card {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .card-title {
        font-size: 16px;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    h1, h2, h3 {
        font-size: 1.2em;
    }

    th, td {
        padding: 10px 8px;
        font-size: 12px;
    }

    .dashboard-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-bottom: 24px !important;
    }

    .dashboard-grid .card {
        padding: 12px 10px !important;
        display: grid !important;
        grid-template-areas: 
            "icon label"
            "icon value";
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 4px 12px;
        text-align: left;
    }

    .dashboard-grid .card > div:last-child {
        display: contents !important;
    }

    .stat-icon-wrapper {
        grid-area: icon;
        width: 32px !important;
        height: 32px !important;
        margin: 0 !important;
    }
    
    .stat-icon {
        font-size: 18px !important;
    }

    .stat-label {
        grid-area: label;
        font-size: 10px;
        line-height: 1.1;
        margin-bottom: 0 !important;
    }

    .stat-value {
        grid-area: value;
        font-size: 18px;
        line-height: 1 !important;
    }

    .quick-actions-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-actions-grid .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 13px;
    }
}

/* Calendar Event Text Wrapping */
.fc-event-title {
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

@media (max-width: 768px) {
    .fc-event-title {
        font-size: 10.5px !important;
    }
}

/* ============================================================
   SWEETALERT2 MODAL SYSTEM (Dark Theme Design System Overrides)
   ============================================================ */

/* Overlay backdrop */
.swal2-container {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    background: rgba(0, 0, 0, 0.72) !important;
    z-index: 10000 !important;
    padding: 16px !important;
}

/* Modal Popup Window */
.swal2-popup {
    background: #141418 !important;
    background: linear-gradient(145deg, rgba(24, 24, 30, 0.98), rgba(16, 16, 20, 0.98)) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
    color: var(--text-color) !important;
    font-family: 'Inter', sans-serif !important;
    padding: 24px !important;
    box-sizing: border-box !important;
}

/* Modal Title */
.swal2-title {
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    padding: 0 0 16px 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-align: left !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Modal Content Container */
.swal2-html-container {
    color: #d4d4d8 !important;
    font-size: 13.5px !important;
    line-height: 1.5 !important;
    margin: 16px 0 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
    overflow-x: hidden !important;
}

/* Modal Form Controls (Inputs, Selects, Textareas) */
.swal2-input,
.swal2-select,
.swal2-textarea,
.modal-input,
.modal-select {
    width: 100% !important;
    box-sizing: border-box !important;
    background: rgba(28, 28, 34, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 13px !important;
    padding: 9px 12px !important;
    height: auto !important;
    min-height: 38px !important;
    box-shadow: none !important;
    margin: 0 !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.swal2-input:focus,
.swal2-select:focus,
.swal2-textarea:focus,
.modal-input:focus,
.modal-select:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2) !important;
    outline: none !important;
    background: rgba(36, 36, 44, 0.9) !important;
}

.swal2-input::placeholder,
.swal2-textarea::placeholder {
    color: #71717a !important;
}

.swal2-select option {
    background-color: #18181b !important;
    color: #fafafa !important;
    padding: 6px 10px !important;
}

/* Form Labels inside Modals */
.modal-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #a1a1aa !important;
    margin-bottom: 6px !important;
    letter-spacing: 0.01em !important;
}

.modal-group {
    margin-bottom: 16px !important;
}

.modal-card-inner {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 14px !important;
    margin-bottom: 14px !important;
}

/* Actions Buttons Area */
.swal2-actions {
    margin: 20px 0 0 0 !important;
    padding-top: 16px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    width: 100% !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 10px !important;
}

/* Confirm Button */
.swal2-styled.swal2-confirm {
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    padding: 9px 20px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.swal2-styled.swal2-confirm:hover {
    background: var(--primary-hover) !important;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4) !important;
}

/* Cancel Button */
.swal2-styled.swal2-cancel {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #e4e4e7 !important;
    border-radius: 8px !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    margin: 0 !important;
}

.swal2-styled.swal2-cancel:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Close Button (X) */
.swal2-close {
    color: #a1a1aa !important;
    font-size: 22px !important;
    border-radius: 8px !important;
    width: 32px !important;
    height: 32px !important;
    top: 14px !important;
    right: 14px !important;
    transition: all 0.2s !important;
    border: none !important;
    background: transparent !important;
}

.swal2-close:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* Validation Message */
.swal2-validation-message {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 12.5px !important;
    margin: 14px 0 0 0 !important;
}

/* Icon overrides */
.swal2-icon {
    border-width: 3px !important;
    margin: 12px auto 16px !important;
    scale: 0.9;
}
.swal2-icon.swal2-warning {
    border-color: var(--warning-color) !important;
    color: var(--warning-color) !important;
}
.swal2-icon.swal2-error {
    border-color: var(--danger-color) !important;
    color: var(--danger-color) !important;
}
.swal2-icon.swal2-success {
    border-color: var(--success-color) !important;
    color: var(--success-color) !important;
}
.swal2-icon.swal2-question {
    border-color: #60a5fa !important;
    color: #60a5fa !important;
}

/* Card Grid & File Card System (Gardens, Products, Producers, Customers) */
.card-grid, .file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.file-card {
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.file-card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.35);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.file-preview {
    width: 100%;
    height: 100px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.icon-preview {
    font-size: 38px;
    transition: transform 0.25s ease;
}

.file-card:hover .icon-preview {
    transform: scale(1.08);
}

.file-context {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.file-context > button {
    background: rgba(18, 18, 20, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.file-context > button:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.file-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.file-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.file-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* Settings Tabs Navigation */
.tabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.sys-tab-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s;
}

.sys-tab-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.05);
}

.sys-tab-btn.active {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary-color);
    font-weight: 600;
}

.hidden, .sys-tab-content.hidden, .main-tab-pane.hidden {
    display: none !important;
}

/* Rock-Solid Navigation Stabilization (Zero Jitter, Zero Flash) */
.top-nav-bar,
.mobile-header,
.mobile-nav {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    will-change: transform;
}

.main-content {
    transition: opacity 0.16s ease-out;
}

.main-content.content-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ==========================================================================
   Universal Skeleton Loading Styles & Shimmer Animation
   ========================================================================== */
@keyframes skeletonShimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.02) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.02) 75%
    ) !important;
    background-size: 200% 100% !important;
    animation: skeletonShimmer 1.5s ease-in-out infinite !important;
    pointer-events: none !important;
    user-select: none !important;
    border: none !important;
}

.skeleton-wrapper {
    animation: fadeIn 0.18s ease-out;
}


/* ==========================================================================
   Finansal & İstatistik Sayfası Özel Stilleri
   ========================================================================== */

.stat-filter-card {
    background: rgba(24, 24, 27, 0.45);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 24px;
}

.filter-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.date-range-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.date-input-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 6px 12px;
    transition: all 0.2s;
}

.date-input-wrap:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.date-input-wrap i {
    color: var(--text-muted);
    font-size: 13px;
}

.date-input-wrap label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin: 0;
}

.date-input-field {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-color);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color-scheme: dark;
    cursor: pointer;
}

.preset-btn-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    line-height: 1.2;
}

.preset-btn:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.preset-btn.active {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
}

.stat-kpi-card {
    background: rgba(24, 24, 27, 0.35);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-kpi-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-kpi-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-kpi-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-kpi-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-kpi-value {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.stat-kpi-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

.accounting-two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .accounting-two-col {
        grid-template-columns: 1fr;
    }
}

.financial-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.financial-table tr th {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.financial-table tr td {
    padding: 12px 14px;
    font-size: 13.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.financial-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.statement-row-highlight {
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
}

.statement-row-highlight td {
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
}

.statement-row-final {
    background: rgba(249, 115, 22, 0.08);
    font-weight: 700;
}

.statement-row-final td {
    border-top: 1px solid rgba(249, 115, 22, 0.3);
    border-bottom: 1px solid rgba(249, 115, 22, 0.3);
    font-size: 15px;
}

.progress-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 99px;
    overflow: hidden;
    position: relative;
    margin-top: 6px;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.4s ease;
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.mini-badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.mini-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.mini-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.mini-badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.mini-badge-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

/* ==========================================================================
   Bottom-Center Toast Notification System (Fade In Up)
   ========================================================================== */
#toast-container {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    max-width: 90vw;
}

.toast-item {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(24, 24, 28, 0.94);
    color: #f4f4f5;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: -0.01em;
    animation: toastFadeInUp 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.22s ease, transform 0.22s ease;
    cursor: pointer;
    user-select: none;
    max-width: 500px;
    text-align: center;
    word-break: break-word;
}

.toast-item.toast-hiding {
    animation: toastFadeOutDown 0.22s cubic-bezier(0.7, 0, 0.84, 0) forwards;
}

.toast-item-icon {
    font-size: 15px;
    flex-shrink: 0;
}

.toast-item-text {
    flex: 1;
}

@keyframes toastFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastFadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(14px) scale(0.96);
    }
}

/* ==========================================================================
   Slide-Over Right Side Drawer (Rafina Garden Theme)
   ========================================================================== */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 580px;
    max-width: 100vw;
    background: rgba(13, 13, 16, 0.94);
    background-image: 
        radial-gradient(at 100% 0%, rgba(249, 115, 22, 0.07) 0px, transparent 60%),
        radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: auto, 28px 28px;
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.04);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.side-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 24, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-shrink: 0;
}

.drawer-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}

.drawer-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.35);
    transform: scale(1.05);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.drawer-body::-webkit-scrollbar {
    width: 6px;
}
.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}
.drawer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 4px;
}
.drawer-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.drawer-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(20, 20, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

.drawer-card {
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.drawer-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(28, 28, 32, 0.65);
}

.drawer-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.drawer-stat-box {
    background: rgba(24, 24, 27, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.drawer-stat-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.drawer-stat-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.drawer-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

/* Clickable table row hover */
tr.clickable-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

tr.clickable-row:hover td {
    background-color: rgba(249, 115, 22, 0.05) !important;
}

@media (max-width: 600px) {
    .side-drawer {
        width: 100vw;
    }
    .drawer-stat-grid {
        grid-template-columns: 1fr;
    }
}