/* Form Oluşturma uygulaması (formolusturma.zerbilgi.com) */
:root {
    --f-navy: #10233f;
    --f-blue: #0a6fe0;
    --f-orange: #f5883a;
    --f-ink: #1b2a3d;
    --f-muted: #66768c;
    --f-line: #e3e8ef;
    --f-bg: #f4f6fa;
    --f-card: #ffffff;
    --f-radius: 16px;
    --bs-primary: var(--f-blue);
    --bs-primary-rgb: 10, 111, 224;
    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
    background: var(--f-bg);
    color: var(--f-ink);
    font-family: var(--bs-body-font-family);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--f-blue); }

/* --- Üst çubuk --- */
.f-topbar {
    background: var(--f-card);
    border-bottom: 1px solid var(--f-line);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.f-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--f-navy);
}

.f-brand img { height: 30px; }

.f-brand-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.1;
}

.f-brand-sub {
    font-size: 11px;
    color: var(--f-muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.f-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--f-blue), #4c9bf5);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.f-user-btn {
    border: 1px solid var(--f-line);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--f-ink);
}

.f-user-btn:hover, .f-user-btn:focus { border-color: #c7d2e0; }

/* --- Sayfa başlığı --- */
.f-hero {
    background: linear-gradient(135deg, var(--f-navy) 0%, #183a66 100%);
    color: #fff;
    border-radius: var(--f-radius);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.f-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 136, 58, .35), transparent 70%);
}

.f-hero h1 { font-weight: 700; font-size: 26px; margin: 0; }
.f-hero p { color: rgba(255, 255, 255, .72); margin: 6px 0 0; }

.f-eyebrow {
    color: var(--f-orange);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* --- Form kartları (anasayfa) --- */
.f-form-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--f-card);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    padding: 22px;
    text-decoration: none;
    color: inherit;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.f-form-card:hover, .f-form-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(10, 111, 224, .35);
    box-shadow: 0 14px 30px rgba(16, 35, 63, .08);
    color: inherit;
}

.f-form-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(10, 111, 224, .1);
    color: var(--f-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 16px;
}

.row > :nth-child(3n+2) .f-form-icon { background: rgba(245, 136, 58, .12); color: var(--f-orange); }

.f-form-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.f-form-card p { font-size: 13.5px; color: var(--f-muted); margin-bottom: 16px; }

.f-form-card .f-go {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    color: var(--f-blue);
}

.f-form-card .f-go i { transition: transform .18s ease; }
.f-form-card:hover .f-go i { transform: translateX(4px); }

/* --- Form doldurma ekranı --- */
.f-section {
    background: var(--f-card);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    padding: 24px;
    margin-bottom: 18px;
}

.f-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--f-navy);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.f-section-title::before {
    content: '';
    width: 4px;
    height: 18px;
    border-radius: 4px;
    background: var(--f-orange);
}

.form-label { font-size: 13px; font-weight: 600; color: #34465e; margin-bottom: 6px; }

.form-control, .form-select {
    border-radius: 10px;
    border-color: #d5dde8;
    padding: 9px 12px;
    font-size: 14.5px;
}

.form-control:focus, .form-select:focus, .form-check-input:focus {
    border-color: var(--f-blue);
    box-shadow: 0 0 0 4px rgba(10, 111, 224, .12);
}

.form-control[readonly] { background: #f2f5f9; color: var(--f-muted); }

/* Tarih alanı: tıklanınca takvim açılır (flatpickr); salt okunur görünmez. */
.form-control.f-tarih {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2366768c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='3'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") no-repeat right 12px center / 16px;
    color: var(--f-ink);
    padding-right: 36px;
    cursor: pointer;
}
.f-table .form-control.f-tarih { min-width: 130px; background-position: right 9px center; padding-right: 30px; }

.flatpickr-calendar {
    font-family: 'Inter', sans-serif;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(16, 35, 63, .18), 0 2px 6px rgba(16, 35, 63, .08);
    padding: 6px 6px 8px;
    width: 320px;
}
.flatpickr-calendar::before, .flatpickr-calendar::after { display: none; }
.flatpickr-months { padding: 4px 0 6px; }
.flatpickr-months .flatpickr-month { height: 40px; color: var(--f-navy); fill: var(--f-navy); }
.flatpickr-current-month { font-size: 15px; font-weight: 700; padding-top: 8px; }
.flatpickr-current-month span.cur-month { font-weight: 700; }
.flatpickr-current-month input.cur-year { font-weight: 700; }
.flatpickr-months .flatpickr-prev-month, .flatpickr-months .flatpickr-next-month {
    top: 8px; height: 32px; width: 32px; padding: 8px; border-radius: 8px;
}
.flatpickr-months .flatpickr-prev-month { left: 8px !important; }
.flatpickr-months .flatpickr-next-month { right: 8px !important; }
.flatpickr-months .flatpickr-prev-month:hover, .flatpickr-months .flatpickr-next-month:hover { background: #eef4fd; }
.flatpickr-months .flatpickr-prev-month:hover svg, .flatpickr-months .flatpickr-next-month:hover svg { fill: var(--f-blue); }
span.flatpickr-weekday { color: var(--f-muted); font-size: 12px; font-weight: 600; }
.flatpickr-innerContainer, .flatpickr-rContainer, .flatpickr-days, .dayContainer { width: 100%; min-width: 0; max-width: none; }
.flatpickr-day {
    border-radius: 9px;
    color: var(--f-ink);
    font-size: 13.5px;
    max-width: none;
    height: 38px;
    line-height: 36px;
}
.flatpickr-day:hover, .flatpickr-day:focus { background: #eef4fd; border-color: #eef4fd; }
.flatpickr-day.today { border-color: var(--f-orange); font-weight: 600; }
.flatpickr-day.today:hover { background: #fff3ea; border-color: var(--f-orange); color: var(--f-ink); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus {
    background: var(--f-blue);
    border-color: var(--f-blue);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(10, 111, 224, .3);
}
.flatpickr-day.prevMonthDay, .flatpickr-day.nextMonthDay { color: #b6c0cd; }

.f-hint { font-size: 12px; color: var(--f-muted); margin-top: 5px; }

.f-required::after { content: ' *'; color: #d9534f; }

.f-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d5dde8;
    border-radius: 10px;
    padding: 8px 14px;
    margin: 0 8px 8px 0;
    cursor: pointer;
    font-size: 14px;
    background: #fff;
    transition: border-color .15s ease, background .15s ease;
    user-select: none;
}

.f-choice:hover { border-color: #aebcd0; }
.f-choice input { margin: 0; }
.f-choice:has(input:checked) { border-color: var(--f-blue); background: rgba(10, 111, 224, .06); color: var(--f-navy); font-weight: 600; }

/* Tablo alanları */
.f-table { border-collapse: separate; border-spacing: 0; width: 100%; }
.f-table th {
    font-size: 12px;
    font-weight: 600;
    color: var(--f-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 0 6px 8px;
    white-space: nowrap;
}
.f-table td { padding: 4px 6px; vertical-align: middle; }
.f-table .form-control, .f-table .form-select { padding: 7px 10px; font-size: 14px; }
.f-table .f-no { width: 34px; text-align: center; color: var(--f-muted); font-weight: 600; font-size: 13px; }
.f-table .f-sum { white-space: nowrap; font-weight: 600; text-align: right; min-width: 110px; }
.f-table tfoot td { padding-top: 12px; }

.f-row-del {
    border: 0;
    background: transparent;
    color: #a3afbf;
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.f-row-del:hover { background: #fdecec; color: #d9534f; }

.f-add-row {
    border: 1px dashed #b8c5d6;
    background: #fafbfd;
    color: var(--f-blue);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13.5px;
    font-weight: 600;
    margin-top: 10px;
}

.f-add-row:hover { background: rgba(10, 111, 224, .06); border-color: var(--f-blue); }

/* Kimlik bilgisi kartı */
.f-identity {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    padding: 16px 20px;
    margin-bottom: 18px;
}

.f-sig-preview {
    height: 46px;
    max-width: 160px;
    object-fit: contain;
    background-color: #fff;
    background-image: linear-gradient(45deg, #f0f2f6 25%, transparent 25%), linear-gradient(-45deg, #f0f2f6 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f2f6 75%), linear-gradient(-45deg, transparent 75%, #f0f2f6 75%);
    background-size: 12px 12px;
    background-position: 0 0, 0 6px, 6px -6px, -6px 0;
    border-radius: 8px;
    border: 1px solid var(--f-line);
    padding: 4px;
}

/* Alt işlem çubuğu */
.f-actionbar {
    position: sticky;
    bottom: 0;
    z-index: 1010;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--f-line);
    padding: 14px 0;
    margin-top: 8px;
}

.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { background: var(--f-blue); border-color: var(--f-blue); }
.btn-primary:hover { background: #075cbc; border-color: #075cbc; }
.btn-navy { background: var(--f-navy); border-color: var(--f-navy); color: #fff; }
.btn-navy:hover { background: #0b1a30; color: #fff; }

/* --- Giriş ekranı --- */
.f-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--f-bg);
}

.f-login-side {
    background: linear-gradient(150deg, var(--f-navy) 0%, #1a3e6e 100%);
    color: #fff;
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.f-login-side::after {
    content: '';
    position: absolute;
    width: 420px;
    height: 420px;
    right: -140px;
    bottom: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 136, 58, .28), transparent 70%);
}

/* Dikey flex kutuda varsayılan "stretch" logoyu tüm genişliğe yayıyordu. */
.f-login-side img { height: 38px; width: auto; align-self: flex-start; filter: brightness(0) invert(1); }
.f-login-side h2 { font-size: 32px; font-weight: 700; line-height: 1.2; margin-bottom: 14px; }
.f-login-side p { color: rgba(255, 255, 255, .7); max-width: 420px; }

.f-login-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.f-login-card { width: 100%; max-width: 380px; }
.f-login-card h1 { font-size: 24px; font-weight: 700; color: var(--f-navy); }

@media (max-width: 991px) {
    .f-login { grid-template-columns: 1fr; }
    .f-login-side { display: none; }
}

/* --- Kullanıcı yönetimi --- */
.f-list {
    background: var(--f-card);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius);
    overflow: hidden;
}

.f-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--f-line);
}

.f-list-row:last-child { border-bottom: 0; }

.f-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(245, 136, 58, .14);
    color: #c25f14;
}

.f-dropzone {
    border: 1.5px dashed #b8c5d6;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    background: #fafbfd;
}

@media (max-width: 767px) {
    .f-hero { padding: 24px; }
    .f-section { padding: 18px; }
    .f-table thead { display: none; }
    .f-table, .f-table tbody, .f-table tr, .f-table td { display: block; width: 100%; }
    .f-table tr { border: 1px solid var(--f-line); border-radius: 12px; padding: 8px; margin-bottom: 10px; }
    .f-table td[data-etiket]::before { content: attr(data-etiket); display: block; font-size: 12px; font-weight: 600; color: var(--f-muted); margin: 4px 0; }
    .f-table .f-no { text-align: left; }
}
