/* ============================================
   Modern Zeytinyağı Yönetim Sistemi - Styles
   ============================================ */

/* Google Fonts - Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================
   CSS Variables - Color Palette
   ============================================ */
:root {
    /* Primary Colors - Zeytinyağı temalı */
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-300: #86efac;
    --primary-400: #4ade80;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    --primary-700: #15803d;
    --primary-800: #166534;
    --primary-900: #14532d;

    /* Accent Colors */
    --accent-amber-400: #fbbf24;
    --accent-amber-500: #f59e0b;
    --accent-amber-600: #d97706;
    --accent-blue-400: #60a5fa;
    --accent-blue-500: #3b82f6;
    --accent-blue-600: #2563eb;
    --accent-red-500: #ef4444;
    --accent-red-600: #dc2626;

    /* Neutral Colors */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    --gradient-primary-soft: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(22, 163, 74, 0.05) 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    --gradient-amber: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    --gradient-blue: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 12px 48px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);

    /* Spacing */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.fs-4 {
    font-weight: 700 !important;
    letter-spacing: -0.03em;
}

/* ============================================
   Sidebar Styles
   ============================================ */
.sidebar {
    width: 280px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(180deg, #15803d 0%, #166534 100%);
    border-right: none;
    padding: 24px 20px;
    transition: transform var(--transition-base);
    z-index: 1040;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Sidebar Logo Area */
.sidebar-logo {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sidebar-logo:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    transition: transform var(--transition-base);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}

.sidebar-logo:hover img {
    transform: scale(1.1);
}

/* Menu Links */
.menu-link {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: white;
    transform: scaleY(0);
    transition: transform var(--transition-base);
}

.menu-link i {
    font-size: 1.2rem;
    transition: transform var(--transition-base);
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(4px);
}

.menu-link:hover i {
    transform: scale(1.1);
}

.menu-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

.menu-link.active::before {
    transform: scaleY(1);
}

/* Menu Divider */
.sidebar nav .border-top {
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin: 16px 0;
}

/* ============================================
   Main Content Area
   ============================================ */
.main {
    margin-left: 280px;
    transition: margin-left var(--transition-base);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Topbar Styles
   ============================================ */
.topbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    padding: 12px 24px !important;
}

.topbar .fw-semibold {
    color: var(--gray-800);
    font-size: 1rem;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
    transition: all var(--transition-base);
    border: 2px solid white;
}

.avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* ============================================
   Content Area
   ============================================ */
.content {
    padding: 32px;
    flex: 1;
}

/* ============================================
   Card Styles
   ============================================ */
.card-soft {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-card);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card-soft::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

.card-soft:hover::before {
    opacity: 1;
}

/* Stat Cards */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(34, 197, 94, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(40%, -40%);
    pointer-events: none;
}

.stat-card:nth-child(2)::after {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.08) 0%, transparent 70%);
}

.stat-card:nth-child(3)::after {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
}

.stat-card:nth-child(4)::after {
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
}

.stat-card .text-muted {
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600) !important;
}

.stat-card .fs-4 {
    color: var(--gray-900);
    margin-top: 8px;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations */
.card-soft {
    animation: fadeInUp var(--transition-slow) ease-out;
    animation-fill-mode: both;
}

.row>.col-6:nth-child(1) .card-soft,
.row>.col-md-3:nth-child(1) .card-soft {
    animation-delay: 0.05s;
}

.row>.col-6:nth-child(2) .card-soft,
.row>.col-md-3:nth-child(2) .card-soft {
    animation-delay: 0.1s;
}

.row>.col-6:nth-child(3) .card-soft,
.row>.col-md-3:nth-child(3) .card-soft {
    animation-delay: 0.15s;
}

.row>.col-6:nth-child(4) .card-soft,
.row>.col-md-3:nth-child(4) .card-soft {
    animation-delay: 0.2s;
}

.menu-link {
    animation: slideInLeft var(--transition-base) ease-out;
    animation-fill-mode: both;
}

.menu-link:nth-child(1) {
    animation-delay: 0.05s;
}

.menu-link:nth-child(2) {
    animation-delay: 0.1s;
}

.menu-link:nth-child(3) {
    animation-delay: 0.15s;
}

.menu-link:nth-child(4) {
    animation-delay: 0.2s;
}

.menu-link:nth-child(5) {
    animation-delay: 0.25s;
}

.menu-link:nth-child(6) {
    animation-delay: 0.3s;
}

.menu-link:nth-child(7) {
    animation-delay: 0.35s;
}

/* ============================================
   Button Styles
   ============================================ */
.btn {
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    border: none;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(34, 197, 94, 0.35);
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
}

.btn-outline-secondary {
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
    background: white;
}

.btn-outline-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
}

/* ============================================
   Form Styles
   ============================================ */
.form-control,
.form-select {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* ============================================
   Alert Styles
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 14px 18px;
    font-weight: 500;
    animation: fadeInUp var(--transition-base) ease-out;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-left: 4px solid var(--accent-amber-600);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid var(--accent-red-600);
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid var(--primary-700);
}

/* ============================================
   Badge Styles
   ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #78350f !important;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.badge.bg-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.badge.bg-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

/* ============================================
   List Group Styles
   ============================================ */
.list-group-item {
    border: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 16px 0;
    transition: all var(--transition-base);
    background: transparent;
}

.list-group-item:hover {
    background: var(--gray-50);
    padding-left: 8px;
}

.list-group-item:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-flush {
    border-radius: 0;
}

/* ============================================
   Chart Container Styles
   ============================================ */
.chart-container {
    position: relative;
    min-height: 300px;
    padding: 16px;
}

canvas {
    border-radius: var(--radius-sm);
}

/* ============================================
   Backdrop
   ============================================ */
.backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
    z-index: 1035;
}

.backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   Utility Classes
   ============================================ */
.is-disabled {
    pointer-events: none;
    opacity: 0.6;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
    }

    .content {
        padding: 20px;
    }

    .topbar {
        padding: 10px 16px !important;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding: 16px;
    }

    .card-soft {
        border-radius: var(--radius-md);
    }

    .stat-card .fs-4 {
        font-size: 1.5rem !important;
    }

    .chart-container {
        min-height: 250px;
    }
}

@media (max-width: 575.98px) {
    .sidebar {
        width: 260px;
    }

    .stat-card .text-muted {
        font-size: 0.75rem;
    }

    .stat-card .fs-4 {
        font-size: 1.3rem !important;
    }

    .chart-container {
        min-height: 200px;
        padding: 8px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {

    .sidebar,
    .topbar,
    .btn,
    .backdrop {
        display: none !important;
    }

    .main {
        margin-left: 0 !important;
    }

    .card-soft {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}

/* ============================================
   Table Styles
   ============================================ */
.table {
    font-size: 0.95rem;
}

.table thead {
    background: var(--gray-50);
    border-bottom: 2px solid var(--gray-200);
}

.table thead th {
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    padding: 14px 12px;
    border-bottom: none;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table-hover tbody tr:hover {
    background: var(--gray-50);
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.table tbody td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
}

.table-light {
    background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
}

.badge.bg-info {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

/* ============================================
   Loading States
   ============================================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-500);
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: 16px 20px;
    margin-bottom: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary-500);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Dark Mode Support
   ============================================ */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1e293b;
        --gray-100: #334155;
        --gray-200: #475569;
        --gray-300: #64748b;
        --gray-700: #cbd5e1;
        --gray-800: #e2e8f0;
        --gray-900: #f1f5f9;
    }

    body {
        background: #0f172a;
        color: #f1f5f9;
    }

    .sidebar {
        background: linear-gradient(180deg, #1e3a28 0%, #1a3324 100%);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }

    .topbar {
        background: rgba(30, 41, 59, 0.9);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .card-soft {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .table {
        color: #f1f5f9;
    }

    .table thead {
        background: rgba(30, 41, 59, 0.6);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }

    .table thead th {
        color: #cbd5e1;
    }

    .table tbody td {
        border-bottom-color: rgba(255, 255, 255, 0.05);
    }

    .table-hover tbody tr:hover {
        background: rgba(30, 41, 59, 0.4);
    }

    .form-control,
    .form-select {
        background: rgba(30, 41, 59, 0.6);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f1f5f9;
    }

    .form-control:focus,
    .form-select:focus {
        background: rgba(30, 41, 59, 0.8);
        border-color: var(--primary-500);
    }

    .btn-outline-secondary {
        border-color: rgba(255, 255, 255, 0.2);
        color: #cbd5e1;
    }

    .btn-outline-secondary:hover {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.3);
    }

    .list-group-item {
        background: transparent;
        border-bottom-color: rgba(255, 255, 255, 0.05);
        color: #f1f5f9;
    }

    .list-group-item:hover {
        background: rgba(30, 41, 59, 0.4);
    }

    .text-muted {
        color: #94a3b8 !important;
    }

    .bg-light {
        background: rgba(30, 41, 59, 0.4) !important;
    }
}

/* ============================================
   Pagination Styles
   ============================================ */
.pagination {
    gap: 8px;
}

.page-link {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
    font-weight: 600;
    padding: 8px 14px;
    transition: all var(--transition-base);
}

.page-link:hover {
    background: var(--primary-50);
    border-color: var(--primary-500);
    color: var(--primary-700);
    transform: translateY(-2px);
}

.page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: var(--primary-600);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

/* ============================================
   Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 5px;
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-500);
}

/* ============================================
   Focus Visible Styles
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
    outline-offset: 4px;
}