:root {
    --venus-blue: #009ee2;
    --venus-dark-blue: #18397a;
    --venus-dark-gray: #2c2e2f;
    --venus-light-gray: #f6f7f8;
}

body {
    background-color: var(--venus-light-gray);
    font-family: 'Google Sans Flex', 'Google Sans', 'Segoe UI', sans-serif;
}

/* ─── Sidebar ─────────────────────────────────────────── */
#sidebar {
    width: 250px;
    min-height: 100vh;
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: width 0.2s;
}

#sidebar .sidebar-brand {
    padding: 20px 16px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

#sidebar .sidebar-brand img {
    max-height: 36px;
}

#sidebar .nav-link {
    color: var(--venus-dark-gray);
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    margin: 2px 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s;
    text-decoration: none;
}

#sidebar .nav-link:hover {
    color: var(--venus-dark-blue);
    background-color: #eef4fb;
}

#sidebar .nav-link.active {
    color: var(--venus-dark-blue);
    background-color: #ddeaf7;
    font-weight: 600;
}

#sidebar .nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #9ca3af;
    transition: color 0.15s;
}

#sidebar .nav-link:hover i,
#sidebar .nav-link.active i {
    color: var(--venus-blue);
}

#sidebar .nav-section {
    font-size: 0.68rem;
    font-weight: 600;
    color: #b0b7c3;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 12px 24px 4px;
}

/* Sidebar logout button */
#sidebar > div:last-child {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
}

#sidebar > div:last-child .nav-link {
    color: #6b7280;
}

#sidebar > div:last-child .nav-link:hover {
    color: #dc2626;
    background-color: #fff0f0;
}

/* ─── Topbar ──────────────────────────────────────────── */
#topbar {
    height: 64px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: fixed;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
}

#topbar > .d-flex:first-child {
    flex: 1;
    max-width: 720px;
    margin-right: 24px;
}

/* ─── Main content ───────────────────────────────────── */
#main-content {
    margin-left: 250px;
    padding-top: 64px;
    min-height: 100vh;
}

.content-area {
    padding: 24px;
}

/* ─── Cards ──────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 16px;
    height: 100%;
    transition: box-shadow .15s ease, transform .15s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 14px rgba(24, 57, 122, .08);
    transform: translateY(-1px);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--venus-dark-gray);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* İkincil metrik: ana sayının hemen altındaki ek bilgi satırı */
.stat-card .stat-sub {
    font-size: 0.75rem;
    color: var(--venus-blue);
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #e5e7eb;
    line-height: 1.35;
}

.stat-card .stat-sub .stat-sub-value {
    font-weight: 700;
}

.stat-card .stat-sub.muted {
    color: #9ca3af;
}

/* Excel'deki yeşil satırlarla aynı vurgu: daha sık yedeklenen siteler */
.table tbody tr.row-frequent-backup > td {
    background: #e8f6ec;
}

/* ─── Kategori dağılımı rozetleri ────────────────────── */
.cat-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    background: #f3f6fb;
    border: 1px solid #e2e8f4;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #4b5563;
    white-space: nowrap;
}

.cat-chip .cat-chip-count {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--venus-dark-blue);
}

/* ─── Page header ────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--venus-dark-gray);
    margin: 0;
}

/* ─── Tables ─────────────────────────────────────────── */
.table-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.table-card .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

.table-card .table-scroll > .table {
    min-width: 640px;
}

.table-card .table {
    margin-bottom: 0;
}

.table thead th {
    background-color: var(--venus-light-gray);
    font-size: 0.78rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 16px;
    white-space: nowrap;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    font-size: 0.875rem;
    color: var(--venus-dark-gray);
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: #fafafa;
}

/* ─── Links ──────────────────────────────────────────── */
a:not(.btn):not(.nav-link):not(.page-link):not(.badge) {
    color: var(--venus-dark-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s;
}

a:not(.btn):not(.nav-link):not(.page-link):not(.badge):hover {
    color: var(--venus-blue);
    text-decoration: none;
}

/* ─── Badges ─────────────────────────────────────────── */
.badge-taslak     { background-color: #e5e7eb; color: #374151; }
.badge-gonderildi { background-color: #dbeafe; color: #1d4ed8; }
.badge-kabul      { background-color: #d1fae5; color: #065f46; }
.badge-reddedildi { background-color: #fee2e2; color: #991b1b; }

.badge-expiry-ok   { background-color: #d1fae5; color: #065f46; }
.badge-expiry-warn { background-color: #fef3c7; color: #92400e; }
.badge-expiry-soon { background-color: #fee2e2; color: #991b1b; }
.badge-expiry-expired { background-color: #f3f4f6; color: #6b7280; }

.btn-xs { font-size:.72rem; padding:2px 7px; line-height:1.4; border-radius:4px; }

/* ─── Forms ──────────────────────────────────────────── */
.form-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 24px;
}

.form-label {
    font-size: 0.825rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.form-control, .form-select {
    font-size: 0.875rem;
    border-color: #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: var(--venus-blue);
    box-shadow: 0 0 0 3px rgba(0, 158, 226, 0.15);
}

/* ─── Buttons ────────────────────────────────────────── */
.btn-venus {
    background-color: var(--venus-blue);
    color: #fff;
    border: none;
}

.btn-venus:hover {
    background-color: #0085c0;
    color: #fff;
}

.btn-venus-dark {
    background-color: var(--venus-dark-blue);
    color: #fff;
    border: none;
}

.btn-venus-dark:hover {
    background-color: #0f2554;
    color: #fff;
}

/* ─── Search bar ─────────────────────────────────────── */
.search-input-wrapper {
    position: relative;
    max-width: 320px;
}

.search-input-wrapper i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.85rem;
}

.search-input-wrapper .form-control {
    padding-left: 32px;
}

.search-input-wrapper--topbar {
    width: 100%;
    max-width: 640px;
}

.search-input-wrapper--topbar i {
    left: 16px;
    font-size: 1.05rem;
}

.search-input-wrapper--topbar .form-control {
    padding: 11px 18px 11px 44px;
    font-size: 1.05rem;
    border-radius: 10px;
    border-color: #d1d5db;
}

.search-input-wrapper--topbar .form-control::placeholder {
    font-size: 1.05rem;
    color: #9ca3af;
}

.search-input-wrapper--topbar .form-control:focus {
    border-color: var(--venus-blue);
    box-shadow: 0 0 0 3px rgba(0, 158, 226, 0.15);
}

/* ─── Misc ───────────────────────────────────────────── */
.quote-item-row td { vertical-align: middle; }

.expiry-alert-box {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* ─── Responsive ─────────────────────────────────────── */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 104;
}

#sidebar-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    #sidebar {
        width: 260px;
        z-index: 105;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: none;
    }

    body.sidebar-open #sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    }

    body.sidebar-open #sidebar-overlay {
        display: block;
        left: 260px;
    }

    body.sidebar-open #topbar {
        z-index: 106;
    }

    #sidebar-toggle {
        display: inline-flex;
    }

    #topbar { left: 0; height: 56px; padding: 0 12px; }
    #main-content { margin-left: 0; padding-top: 56px; }
    #topbar > .d-flex:first-child { max-width: none; margin-right: 8px; }
    .content-area { padding: 16px 12px; }
    .page-header { flex-wrap: wrap; gap: 12px; }
    .page-header h1 { font-size: 1.15rem; }
    .search-input-wrapper--topbar .form-control { font-size: 0.9rem; padding: 8px 12px 8px 36px; }
    .search-input-wrapper--topbar .form-control::placeholder { font-size: 0.9rem; }
    .search-input-wrapper--topbar i { left: 12px; font-size: 0.85rem; }
}
