/**
 * Görsel arayüz teması — gradient, dekoratif arka plan, cam kartlar
 */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,500&display=swap');

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --accent: #06b6d4;
    --accent-warm: #f59e0b;
    --sidebar-bg: #0c1222;
    --sidebar-surface: rgba(255, 255, 255, 0.04);
    --sidebar-hover: rgba(99, 102, 241, 0.2);
    --body-bg: #eef2ff;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-bg-solid: #ffffff;
    --text: #0f172a;
    --text-muted: #64748b;
    --border: rgba(99, 102, 241, 0.12);
    --radius: 0.875rem;
    --radius-lg: 1.125rem;
    --radius-xl: 1.5rem;
    --shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
    --shadow-md: 0 12px 40px rgba(79, 70, 229, 0.14);
    --shadow-glow: 0 0 60px rgba(99, 102, 241, 0.15);
    --font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #6366f1 40%, #06b6d4 100%);
    --gradient-sidebar: linear-gradient(165deg, #0c1222 0%, #1e1b4b 50%, #312e81 100%);
}

body {
    font-family: var(--font);
    background: var(--body-bg);
}

body.auth-page {
    background: linear-gradient(145deg, #0c1222 0%, #312e81 40%, #4f46e5 70%, #06b6d4 100%);
}

.auth-shell::before {
    background: radial-gradient(circle, #a5b4fc 0%, transparent 70%);
    width: 420px;
    height: 420px;
}

.auth-shell::after {
    background: radial-gradient(circle, #67e8f9 0%, transparent 70%);
}

.auth-card {
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.auth-card-header {
    background: var(--gradient-brand);
    position: relative;
    overflow: hidden;
}

.auth-card-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

.btn-auth-submit {
    background: var(--gradient-brand);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

/* ——— Panel ——— */
.app-sidebar {
    background: var(--gradient-sidebar);
    box-shadow: 8px 0 40px rgba(12, 18, 34, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
}

.app-sidebar::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(129, 140, 248, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.sidebar-brand {
    border-bottom-color: rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.sidebar-user {
    background: var(--sidebar-surface);
    margin: 0 0.75rem 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    z-index: 1;
}

.sidebar-nav {
    position: relative;
    z-index: 1;
}

.sidebar-nav a {
    padding: 0.7rem 0.85rem;
    border: 1px solid transparent;
    font-weight: 500;
}

.sidebar-nav a .nav-icon-wrap {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    color: #fff;
}

.sidebar-nav-item--create .nav-icon-wrap {
    background: linear-gradient(135deg, #059669, #34d399);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.sidebar-nav-item--quotes .nav-icon-wrap {
    background: linear-gradient(135deg, #4f46e5, #818cf8);
}

.sidebar-nav-item--veresiye .nav-icon-wrap {
    background: linear-gradient(135deg, #db2777, #f472b6);
}

.sidebar-nav-item--todos .nav-icon-wrap {
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
}

.sidebar-nav-item--products .nav-icon-wrap {
    background: linear-gradient(135deg, #2563eb, #60a5fa);
}

.sidebar-nav-item--settings .nav-icon-wrap {
    background: linear-gradient(135deg, #0891b2, #22d3ee);
}

.sidebar-nav a i {
    font-size: 1.1rem;
    opacity: 1;
}

.sidebar-nav a:hover {
    background: var(--sidebar-hover);
    border-color: rgba(129, 140, 248, 0.25);
    color: #fff;
}

.sidebar-nav a:hover .nav-icon-wrap {
    background: rgba(99, 102, 241, 0.45);
    transform: scale(1.05);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.55), rgba(6, 182, 212, 0.35));
    border-color: rgba(165, 180, 252, 0.4);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.sidebar-nav a.active .nav-icon-wrap {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-footer {
    position: relative;
    z-index: 1;
}

.app-main {
    position: relative;
    background: transparent;
}

.app-visual-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

.visual-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.visual-orb-1 {
    width: 480px;
    height: 480px;
    background: #a5b4fc;
    top: -120px;
    right: -80px;
}

.visual-orb-2 {
    width: 360px;
    height: 360px;
    background: #99f6e4;
    bottom: 10%;
    left: -60px;
}

.visual-orb-3 {
    width: 280px;
    height: 280px;
    background: #fde68a;
    top: 40%;
    right: 15%;
    opacity: 0.35;
}

.app-content {
    position: relative;
    /* z-index verilmez — aksi halde Bootstrap modal backdrop üstte kalır, pencere tıklanamaz */
}

/* Sayfa başlığı — banner */
.page-header {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--gradient-brand);
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.page-header h1,
.page-header h2 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, #1e1b4b, #4f46e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header h1 i,
.page-header h2 i {
    -webkit-text-fill-color: var(--primary);
    background: none;
}

.page-header .btn-primary {
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Kartlar */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card.table-responsive-mobile,
.card.card-table-scroll {
    max-width: 100%;
}

.quotes-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.quotes-list-table {
    min-width: 900px;
    margin-bottom: 0;
}

.table thead th {
    background: linear-gradient(180deg, #f5f3ff 0%, #eef2ff 100%);
    color: #4338ca;
    border-bottom: 2px solid rgba(99, 102, 241, 0.15);
}

.table-hover tbody tr:hover {
    background: rgba(238, 242, 255, 0.7);
}

/* İstatistik kartları */
.stat-card {
    border: none;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    top: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.stat-card .stat-label {
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
}

.stat-card .stat-value {
    color: #fff;
    font-size: 2.1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.stat-card .stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card.stat-quotes {
    background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}

.stat-card.stat-products {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
}

.stat-card.stat-categories {
    background: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
}

.stat-card.stat-customers {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 50%, #f472b6 100%);
}

.stat-card.stat-debt {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 50%, #f87171 100%);
}

.stat-card.stat-paid {
    background: linear-gradient(135deg, #0891b2 0%, #06b6d4 50%, #22d3ee 100%);
}

.stat-card.stat-balance {
    background: linear-gradient(135deg, #b45309 0%, #f59e0b 50%, #fbbf24 100%);
}

/* Butonlar */
.btn-primary {
    background: var(--gradient-brand);
    border: none;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca, #4f46e5);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45);
}

.btn-outline-primary {
    border-width: 2px;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--gradient-brand);
    border-color: transparent;
}

/* Uyarılar */
.alert {
    border-left: 4px solid;
    backdrop-filter: blur(8px);
}

.alert-success {
    background: rgba(236, 253, 245, 0.95);
    border-left-color: #10b981;
}

.alert-danger {
    background: rgba(254, 242, 242, 0.95);
    border-left-color: #ef4444;
}

.alert-warning {
    border-left-color: #f59e0b;
}

/* Form */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

/* Ayarlar nav */
.settings-nav {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.settings-nav-link.active {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: var(--primary-dark);
}

.settings-section {
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    background: var(--card-bg-solid);
}

.settings-section-head {
    background: linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
}

/* Yapılacaklar */
.todo-item {
    border-radius: var(--radius-lg);
    background: var(--card-bg-solid);
}

.todo-tabs .nav-link.active {
    background: var(--gradient-brand);
}

.customer-lookup-card {
    border-top: 3px solid var(--primary);
}

.customer-balance-hero {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(6, 182, 212, 0.08) 100%) !important;
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    box-shadow: var(--shadow-md);
}

.customer-name-link:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

.customer-name-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.customer-name-cell--header .customer-name-text {
    font-size: inherit;
    font-weight: inherit;
    background: inherit;
    -webkit-text-fill-color: inherit;
    color: inherit;
}

.customer-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.customer-row-actions .btn {
    padding: 0.2rem 0.45rem;
    line-height: 1.2;
}

.customer-row-actions form {
    margin: 0;
}

.veresiye-subnav .nav-link {
    border-radius: 999px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.veresiye-subnav .nav-link .bi {
    font-size: 1.05rem;
    opacity: 0.85;
}

.product-pagination .page-link {
    border-radius: 0.5rem;
    margin: 0 2px;
    font-weight: 600;
    color: var(--primary-dark);
}

.product-pagination .page-item.active .page-link {
    background: var(--gradient-brand);
    border-color: transparent;
    color: #fff;
}

.veresiye-subnav .nav-link.active {
    background: var(--gradient-brand);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.veresiye-subnav .nav-link:not(.active):hover {
    color: var(--primary-dark);
    border-color: rgba(99, 102, 241, 0.35);
}

@media (max-width: 991.98px) {
    .veresiye-subnav {
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        padding-bottom: 0.35rem;
        margin-bottom: 1rem !important;
    }

    .veresiye-subnav .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .settings-layout > [class*="col-"] {
        min-width: 0;
    }
}

.table-sort-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.table-sort-link:hover {
    color: var(--primary);
}

/* Rozet */
.badge.bg-secondary {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe) !important;
    color: #4338ca !important;
    font-weight: 600;
}

/* Sayfa kahramanı (illüstrasyonlu başlık) */
.page-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: linear-gradient(105deg, transparent 40%, rgba(99, 102, 241, 0.06) 100%);
    pointer-events: none;
}

.page-hero__illus {
    flex-shrink: 0;
    width: 120px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(224, 231, 255, 0.6));
    border-radius: var(--radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.15);
    position: relative;
    z-index: 1;
}

.page-hero__illus .illus-svg,
.page-hero__illus .illus-fallback {
    width: 100%;
    height: auto;
    max-height: 88px;
    display: block;
}

.illus-svg {
    width: 100%;
    height: auto;
    display: block;
}

.illus-svg--hero {
    max-height: 88px;
}

.illus-svg--auth {
    max-width: 280px;
    margin: 0 auto;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.2));
}

.illus-svg--sm,
.illus-svg--nav {
    max-height: 52px;
}

.illus-svg--empty {
    max-width: 140px;
    margin: 0 auto;
}

.illus-svg--nav {
    max-width: 120px;
    margin: 0 auto;
}

.illus-fallback {
    width: 100%;
    height: 100%;
    min-height: 64px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--illus-c1, #6366f1), var(--illus-c2, #06b6d4));
    color: #fff;
    font-size: 2.25rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.illus-fallback.illus-svg--sm {
    min-height: 44px;
    font-size: 1.5rem;
    border-radius: var(--radius);
}

.page-hero__title .bi {
    -webkit-text-fill-color: initial;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.page-hero__body {
    flex: 1 1 200px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.page-hero__title {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.page-hero__subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 42rem;
}

.page-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-left: auto;
    position: relative;
    z-index: 1;
}

/* Giriş sayfası görsel panel */
.auth-shell--visual {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
    align-items: center;
    justify-items: center;
    padding: 2rem 1.25rem;
    gap: 2rem;
}

@media (min-width: 992px) {
    .auth-shell--visual {
        grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
        max-width: 960px;
        margin: 0 auto;
        padding: 3rem 2rem;
    }
}

.auth-visual-panel {
    display: none;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 992px) {
    .auth-visual-panel {
        display: block;
    }
}

.auth-visual-panel img {
    width: min(100%, 280px);
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.2));
}

.auth-visual-tagline {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.auth-visual-desc {
    font-size: 0.95rem;
    opacity: 0.85;
    max-width: 320px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Kart üst şerit görseli */
.card-graphic-top {
    margin: -1px -1px 0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(224, 231, 255, 0.7));
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.card-graphic-top .illus-wrap,
.card-graphic-top .illus-svg,
.card-graphic-top .illus-fallback {
    width: 56px;
    height: 44px;
    flex-shrink: 0;
}

.card-graphic-top .illus-svg {
    max-height: 44px;
}

.card-graphic-top .illus-fallback {
    min-height: 44px;
    font-size: 1.35rem;
    border-radius: 10px;
}

.card-graphic-top h5 {
    margin: 0;
    font-weight: 700;
}

/* Boş liste durumu */
.empty-state-visual {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.empty-state-visual .illus-svg,
.empty-state-visual .illus-fallback {
    width: 140px;
    max-width: 100%;
    margin: 0 auto 1rem;
    opacity: 0.95;
}

.empty-state-visual .illus-fallback {
    min-height: 100px;
    font-size: 2.75rem;
}

.stat-card .stat-icon {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* Ayarlar navigasyonu görsel */
.settings-nav-illus {
    text-align: center;
    padding: 0.75rem 0 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.75rem;
}

.settings-nav-illus .illus-svg,
.settings-nav-illus .illus-fallback {
    width: 100%;
    max-width: 120px;
    margin: 0 auto;
}

@media (max-width: 991.98px) {
    .page-header {
        padding: 1rem 1.15rem;
    }

    .page-header h1 {
        font-size: 1.35rem;
    }

    .page-hero {
        padding: 1rem 1.15rem;
    }

    .page-hero__illus {
        width: 88px;
        height: 72px;
    }

    .page-hero__title {
        font-size: 1.35rem;
    }

    .page-hero__actions {
        width: 100%;
        margin-left: 0;
    }

    .visual-orb-1 {
        width: 280px;
        height: 280px;
    }
}
