/* ==========================================
   D Event Tedarikçi Panel v6.0 — CSS
   ========================================== */

:root {
    --primary:        #0c4a6e;
    --primary-dark:   #082f49;
    --primary-light:  #0ea5e9;
    --accent:         #f59e0b;
    --accent-dark:    #d97706;
    --success:        #10b981;
    --danger:         #ef4444;
    --warning:        #f59e0b;
    --info:           #3b82f6;
    --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;
    --sidebar-w:      260px;
    --header-h:       60px;
    --radius:         10px;
    --shadow:         0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg:      0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ---- Login Page ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0c4a6e 0%, #082f49 40%, #0ea5e9 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    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.04'%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");
    animation: bgMove 20s linear infinite;
}

@keyframes bgMove {
    from { background-position: 0 0; }
    to   { background-position: 60px 60px; }
}

.login-card {
    position: relative;
    z-index: 1;
    background: white;
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,.3);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .brand-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.login-logo h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.login-logo p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    transition: border-color .2s, box-shadow .2s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}

.form-control.is-invalid { border-color: var(--danger); }

.invalid-feedback {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn-accent {
    background: var(--accent);
    color: white;
}
.btn-accent:hover { background: var(--accent-dark); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-sm { padding: 5px 12px; font-size: 13px; }
.btn-lg { padding: 13px 28px; font-size: 16px; width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ---- App Layout ---- */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--primary-dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    transition: transform .3s;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}

.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-title h2 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-title span {
    font-size: 11px;
    color: rgba(255,255,255,.5);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-section {
    padding: 0 12px;
    margin-bottom: 4px;
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: rgba(255,255,255,.35);
    padding: 8px 8px 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: rgba(255,255,255,.75);
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
    margin-bottom: 1px;
}

.nav-item:hover {
    background: rgba(255,255,255,.08);
    color: white;
}

.nav-item.active {
    background: rgba(14,165,233,.25);
    color: white;
    font-weight: 600;
}

.nav-item .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.nav-badge {
    margin-left: auto;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    margin-bottom: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

.user-info .name { font-size: 13px; font-weight: 600; }
.user-info .role { font-size: 11px; color: rgba(255,255,255,.5); }

/* Main content */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top header */
.top-header {
    height: var(--header-h);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.page-title {
    flex: 1;
    font-size: 17px;
    font-weight: 700;
    color: var(--gray-900);
}

.header-actions { display: flex; align-items: center; gap: 8px; }

/* Page content */
.page-content { padding: 24px; flex: 1; }

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body { padding: 20px; }

/* ---- Stat Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-icon.blue    { background: rgba(14,165,233,.12); }
.stat-icon.green   { background: rgba(16,185,129,.12); }
.stat-icon.amber   { background: rgba(245,158,11,.12); }
.stat-icon.red     { background: rgba(239,68,68,.12); }
.stat-icon.purple  { background: rgba(139,92,246,.12); }
.stat-icon.navy    { background: rgba(12,74,110,.12); }

.stat-value { font-size: 28px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ---- Tables ---- */
.table-container { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-500);
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success  { background: rgba(16,185,129,.12); color: #047857; }
.badge-warning  { background: rgba(245,158,11,.12);  color: #92400e; }
.badge-danger   { background: rgba(239,68,68,.12);   color: #b91c1c; }
.badge-info     { background: rgba(59,130,246,.12);  color: #1d4ed8; }
.badge-secondary{ background: var(--gray-100);        color: var(--gray-600); }
.badge-navy     { background: rgba(12,74,110,.12);   color: var(--primary); }

/* ---- Stars ---- */
.stars { display: inline-flex; gap: 2px; font-size: 14px; }
.star-filled { color: #f59e0b; }
.star-empty  { color: var(--gray-300); }

/* ---- Forms ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-full { grid-column: 1 / -1; }

select.form-control { cursor: pointer; }

textarea.form-control { resize: vertical; min-height: 90px; }

.form-help { font-size: 12px; color: var(--gray-500); margin-top: 4px; }

/* ---- Alert ---- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(16,185,129,.1); color: #065f46; border-left: 4px solid var(--success); }
.alert-danger  { background: rgba(239,68,68,.1);  color: #7f1d1d; border-left: 4px solid var(--danger); }
.alert-warning { background: rgba(245,158,11,.1); color: #78350f; border-left: 4px solid var(--warning); }
.alert-info    { background: rgba(59,130,246,.1); color: #1e3a8a; border-left: 4px solid var(--info); }

/* ---- Search Bar ---- */
.search-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
}

.search-input-wrap input {
    padding-left: 38px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 20px;
    border-top: 1px solid var(--gray-100);
}

.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    transition: all .15s;
}

.pagination a:hover { background: var(--gray-100); }
.pagination .active span {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---- Calculator ---- */
.calc-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

.calc-result {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--gray-200);
}

.calc-total {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 14px;
}

.calc-line:last-child { border-bottom: none; }
.calc-line .label { color: var(--gray-600); }
.calc-line .amount { font-weight: 600; }
.calc-grand { font-size: 18px; font-weight: 800; color: var(--primary); }

/* ---- Vehicle Mix Sliders ---- */
.mix-sliders { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }

.mix-row {
    display: grid;
    grid-template-columns: 120px 1fr 60px;
    align-items: center;
    gap: 10px;
}

.mix-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
}

input[type=range] {
    width: 100%;
    cursor: pointer;
    accent-color: var(--primary);
}

.mix-pct {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

/* ---- Category Pills ---- */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.category-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--gray-200);
    color: var(--gray-600);
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.category-pill:hover, .category-pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ---- Category Color Coding ---- */
.cat-teknik_dekor { color: #7c3aed; }
.cat-transfer     { color: #0ea5e9; }
.cat-dijital      { color: #10b981; }
.cat-dil_baski    { color: #f59e0b; }
.cat-tanitim_ik   { color: #ef4444; }
.cat-restoran     { color: #ec4899; }

/* ---- Score Bars ---- */
.score-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
}

.score-bar-track {
    flex: 1;
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--accent));
    border-radius: 3px;
    transition: width .6s ease;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .form-row { grid-template-columns: 1fr; }
    .form-row.three { grid-template-columns: 1fr; }
    .calc-container { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .top-header { padding: 0 16px; }
    .page-content { padding: 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}

/* ---- Utilities ---- */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; }
.text-sm { font-size: 13px; } .text-xs { font-size: 11px; }
.text-gray { color: var(--gray-500); }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }
.hidden { display: none !important; }
