/* =============================================
   BAYRAM TATİL - Stil Sistemi
   Tema: Sıcak, geleneksel ama modern. 
   Krem zemin, ciğer kırmızısı vurgu, koyu yeşil aksanlar.
   ============================================= */

:root {
    /* Renk paleti - Anadolu tonları */
    --cream: #F5EBDC;
    --cream-warm: #EFE3CE;
    --paper: #FBF6EB;
    --ink: #1F1A14;
    --ink-soft: #4A3F30;
    --ink-mute: #8B7B65;
    
    --red: #B83227;
    --red-deep: #8B1E1E;
    --red-light: #D4513F;
    
    --green: #1F5132;
    --green-light: #2D6A4F;
    
    --gold: #C19A4B;
    --gold-light: #E0BD7A;
    
    --line: #D9C8AB;
    --line-soft: #E8DBC2;
    
    /* Typography */
    --font-display: 'Fraunces', 'Times New Roman', Georgia, serif;
    --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --container: 1200px;
    --radius: 4px;
    --radius-lg: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--ink);
    line-height: 1.55;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Dekoratif arkaplan motifi */
.bg-pattern {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(184, 50, 39, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(31, 81, 50, 0.05) 0%, transparent 40%);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
    padding: 24px 0;
    border-bottom: 1px solid var(--line-soft);
    background: var(--paper);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-display);
}

.logo-mark {
    font-size: 32px;
    color: var(--red);
    line-height: 1;
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.logo-text em {
    font-style: italic;
    color: var(--red);
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

.main-nav a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s;
    position: relative;
}

.main-nav a:hover {
    color: var(--red);
}

.nav-admin {
    background: var(--ink);
    color: var(--cream) !important;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.nav-admin:hover {
    background: var(--red) !important;
    color: var(--cream) !important;
}

.nav-admin-subtle {
    background: transparent;
    color: var(--ink-mute) !important;
    border: 1px solid var(--line);
    font-size: 13px;
}

/* =============================================
   HERO
   ============================================= */
.hero {
    padding: 80px 0 60px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 40px;
    right: 5%;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, var(--red) 0%, transparent 70%);
    opacity: 0.08;
    border-radius: 50%;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-eyebrow {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 16px;
    color: var(--red);
    margin: 0 0 20px;
    letter-spacing: 0.02em;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 84px);
    font-weight: 600;
    line-height: 0.98;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
    color: var(--ink);
}

.title-line {
    display: block;
    background: linear-gradient(135deg, var(--ink) 30%, var(--red-deep) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 19px;
    color: var(--ink-soft);
    margin: 0 0 40px;
    max-width: 480px;
    font-family: var(--font-display);
    font-weight: 400;
    font-style: italic;
}

.hero-meta {
    display: flex;
    gap: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    font-weight: 600;
}

.meta-value {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink);
}

/* Geri sayım kartı */
.countdown-card {
    background: var(--ink);
    color: var(--cream);
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px -20px rgba(31, 26, 20, 0.4);
}

.countdown-card::before {
    content: '۞';
    position: absolute;
    top: -30px;
    right: -10px;
    font-size: 180px;
    color: var(--red);
    opacity: 0.15;
    line-height: 1;
    font-family: var(--font-display);
}

.countdown-label {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 15px;
    color: var(--gold-light);
    margin: 0 0 24px;
    letter-spacing: 0.02em;
    position: relative;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    position: relative;
}

.cd-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 8px;
    background: rgba(245, 235, 220, 0.06);
    border-radius: var(--radius);
    border: 1px solid rgba(245, 235, 220, 0.1);
}

.cd-num {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 600;
    color: var(--cream);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.cd-unit {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-light);
    font-weight: 600;
}

/* =============================================
   AİLE KARTLARI
   ============================================= */
.families-section {
    padding: 40px 0 80px;
}

.families-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.family-card {
    background: var(--paper);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--family-color);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.family-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 40px -12px rgba(31, 26, 20, 0.15);
}

.family-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 4px;
}

.family-card h3 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.01em;
}

.family-count {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    font-weight: 600;
}

.family-head-name {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 20px;
    font-style: italic;
    font-family: var(--font-display);
}

.family-stats {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--line);
}

.fs-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}

.fs-row span {
    color: var(--ink-mute);
}

.fs-row strong {
    font-family: var(--font-display);
    color: var(--ink);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.fs-progress {
    margin-top: 12px;
    height: 6px;
    background: var(--cream-warm);
    border-radius: 100px;
    overflow: hidden;
}

.fs-progress-bar {
    height: 100%;
    background: var(--family-color);
    border-radius: 100px;
    transition: width 0.4s ease;
}

/* =============================================
   GENEL SECTION
   ============================================= */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--cream-warm);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    margin-bottom: 48px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.section-eyebrow {
    font-family: var(--font-display);
    font-style: italic;
    font-size: 14px;
    color: var(--red);
    margin: 0 0 8px;
    letter-spacing: 0.05em;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    margin: 0 0 12px;
    color: var(--ink);
}

.section-desc {
    font-size: 17px;
    color: var(--ink-soft);
    margin: 0;
    max-width: 540px;
}

.section-stats {
    display: flex;
    gap: 28px;
    flex-shrink: 0;
}

.stat {
    text-align: right;
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}

.stat span {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-top: 6px;
    font-weight: 600;
}

/* =============================================
   MALZEME KART/BOARD
   ============================================= */
.items-board {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.item-card {
    background: var(--paper);
    padding: 18px 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s;
}

.item-card:hover {
    border-color: var(--gold);
    transform: translateX(2px);
}

.item-card.done {
    opacity: 0.55;
    background: var(--cream-warm);
}

.item-card.done .item-name {
    text-decoration: line-through;
}

.item-check {
    width: 22px;
    height: 22px;
    border: 2px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: var(--paper);
}

.item-check.checked {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

.item-check.checked::after {
    content: '✓';
    font-size: 13px;
    font-weight: 700;
}

.item-info {
    flex: 1;
    min-width: 0;
}

.item-name {
    font-weight: 600;
    color: var(--ink);
    font-size: 15px;
    margin-bottom: 2px;
}

.item-meta {
    display: flex;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-mute);
}

.item-qty {
    color: var(--gold);
    font-weight: 600;
}

.item-cat-badge {
    text-transform: capitalize;
    background: var(--cream-warm);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
}

.item-family-pick {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
    color: var(--ink-soft);
    flex-shrink: 0;
    max-width: 130px;
}

.item-family-pick:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}

.item-family-pick.assigned {
    border-color: var(--family-color, var(--gold));
    color: var(--family-color, var(--ink));
    font-weight: 600;
}

.item-delete {
    background: transparent;
    border: none;
    color: var(--ink-mute);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.item-delete:hover {
    color: var(--red);
    background: rgba(184, 50, 39, 0.1);
}

/* =============================================
   ADD FORM
   ============================================= */
.add-item-form {
    margin-top: 32px;
    padding: 24px;
    background: var(--paper);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line);
}

.add-item-form h4 {
    margin: 0 0 14px;
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--ink);
    font-weight: 600;
}

.form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-row input,
.form-row select,
.form-row textarea {
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    background: var(--cream);
    color: var(--ink);
    flex: 1;
    min-width: 130px;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: var(--red);
    background: white;
}

.btn {
    padding: 11px 20px;
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--red);
    color: var(--cream);
}

.btn-primary:hover {
    background: var(--red-deep);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--ink);
    color: var(--cream);
}

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}

.btn-ghost:hover {
    border-color: var(--ink);
    color: var(--ink);
}

/* =============================================
   MASRAF LİSTESİ
   ============================================= */
.expense-list {
    background: var(--paper);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--line-soft);
}

.expense-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 20px;
    padding: 16px 24px;
    align-items: center;
    border-bottom: 1px solid var(--line-soft);
    transition: background 0.2s;
}

.expense-row:last-child { border-bottom: none; }

.expense-row:hover {
    background: var(--cream-warm);
}

.expense-desc {
    font-weight: 600;
    color: var(--ink);
}

.expense-cat {
    font-size: 12px;
    color: var(--ink-mute);
    text-transform: capitalize;
    margin-top: 2px;
}

.expense-family {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--cream-warm);
    color: var(--ink);
    font-weight: 600;
    border: 1px solid var(--family-color, var(--line));
    white-space: nowrap;
}

.expense-amount {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* =============================================
   ROTA TIMELINE
   ============================================= */
.route-timeline {
    position: relative;
    padding-left: 36px;
}

.route-timeline::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: linear-gradient(to bottom, var(--red), var(--gold), var(--green));
}

.stop-card {
    position: relative;
    background: var(--paper);
    padding: 22px 26px;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    border: 1px solid var(--line-soft);
}

.stop-card::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 26px;
    width: 14px;
    height: 14px;
    background: var(--red);
    border-radius: 50%;
    border: 3px solid var(--cream);
    box-shadow: 0 0 0 1px var(--line);
}

.stop-card.type-baslangic::before { background: var(--green); }
.stop-card.type-varis::before { background: var(--gold); }
.stop-card.type-mola::before { background: var(--red); }

.stop-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.stop-card:hover .stop-actions {
    opacity: 1;
}

.stop-action-btn {
    background: var(--cream-warm);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-soft);
    font-size: 14px;
    transition: all 0.15s;
}

.stop-action-btn:hover {
    background: var(--paper);
    color: var(--ink);
    border-color: var(--gold);
}

.stop-action-btn.delete:hover {
    color: var(--red);
    border-color: var(--red);
}

.stop-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 6px;
}

.stop-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--ink);
    margin: 0;
    letter-spacing: -0.01em;
}

.stop-time {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--red);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.stop-type-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    font-weight: 700;
    margin-bottom: 8px;
}

.stop-notes {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 8px 0 0;
    line-height: 1.5;
}

.stop-link {
    margin-top: 10px;
    display: inline-block;
    font-size: 13px;
    color: var(--red);
    text-decoration: none;
    font-weight: 600;
}

.stop-link:hover { text-decoration: underline; }

/* =============================================
   ETKİNLİKLER
   ============================================= */
.events-list {
    display: grid;
    gap: 12px;
}

.event-row {
    background: var(--paper);
    padding: 18px 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--line-soft);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.2s;
}

.event-row:hover {
    border-color: var(--gold);
}

.event-row.done { opacity: 0.55; }
.event-row.done .event-title { text-decoration: line-through; }

.event-date-block {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 14px;
    background: var(--ink);
    color: var(--cream);
    border-radius: var(--radius);
    min-width: 70px;
}

.event-date-block .day {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
}

.event-date-block .month {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold-light);
    margin-top: 2px;
}

.event-info { flex: 1; }

.event-title {
    font-weight: 600;
    color: var(--ink);
    margin: 0 0 4px;
    font-size: 16px;
}

.event-desc {
    font-size: 13px;
    color: var(--ink-mute);
    margin: 0;
}

.event-time {
    font-family: var(--font-display);
    color: var(--red);
    font-weight: 600;
}

/* =============================================
   INFO BOX (CTA)
   ============================================= */
.info-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--paper) 0%, var(--cream-warm) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    border-left: 4px solid var(--gold);
    flex-wrap: wrap;
}

.info-box > div {
    flex: 1;
    min-width: 240px;
}

.info-box strong {
    display: block;
    font-family: var(--font-display);
    font-size: 17px;
    margin-bottom: 4px;
    color: var(--ink);
}

.info-box > div:not(strong) {
    font-size: 14px;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* =============================================
   AİLE ROZETİ (header'da)
   ============================================= */
.family-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    background: var(--cream-warm);
    border: 1px solid var(--family-color, var(--line));
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.family-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--family-color, var(--ink));
    border-radius: 50%;
    flex-shrink: 0;
}

.nav-admin {
    /* button olarak da kullanıldığı için */
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

/* =============================================
   AİLE GİRİŞ MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(31, 26, 20, 0.6);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--paper);
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 460px;
    position: relative;
    border-top: 4px solid var(--red);
    box-shadow: 0 30px 80px -20px rgba(31, 26, 20, 0.5);
    animation: modalSlide 0.3s ease;
}

.modal-wide {
    max-width: 560px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    background: var(--cream);
    color: var(--ink);
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--red);
    background: white;
}

textarea.form-input {
    resize: vertical;
    min-height: 60px;
}

@keyframes modalSlide {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--ink-mute);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    background: var(--cream-warm);
    color: var(--ink);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    margin: 4px 0 8px;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.modal-desc {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 24px;
    line-height: 1.5;
}

.modal-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-mute);
    margin-bottom: 10px;
}

.family-pick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.family-pick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 10px;
    background: var(--cream);
    border: 2px solid var(--line-soft);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    transition: all 0.2s;
    text-align: center;
}

.family-pick-btn .dot {
    width: 16px;
    height: 16px;
    background: var(--family-color);
    border-radius: 50%;
}

.family-pick-btn:hover {
    border-color: var(--family-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px -8px rgba(0,0,0,0.15);
}

.family-pick-btn.selected {
    border-color: var(--family-color);
    background: var(--paper);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--family-color) 20%, transparent);
}

.family-pick-btn.selected::before {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 18px;
    height: 18px;
    background: var(--family-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.family-pick-btn {
    position: relative;
}

.pick-head {
    font-size: 11px !important;
    color: var(--ink-mute) !important;
    font-weight: 500 !important;
    font-style: italic;
    margin-top: 2px;
}

/* Header'daki aile rozeti - butonlu hali */
.family-badge-btn {
    cursor: pointer;
    transition: all 0.2s;
}

.family-badge-btn:hover {
    background: var(--paper);
    transform: translateY(-1px);
}

.badge-arrow {
    font-size: 11px;
    color: var(--ink-mute);
    margin-left: 2px;
}

/* Kilitli/disabled item göstergesi */
.item-card.locked-other {
    background: var(--cream);
    opacity: 0.85;
}

.item-card.locked-other .item-check {
    cursor: not-allowed;
    background: var(--cream);
    border-color: var(--line);
    opacity: 0.5;
}

.item-card.locked-other .item-name {
    color: var(--ink-soft);
}

.item-mine-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 6px;
}

.item-mine-indicator::before {
    content: '✓';
    background: var(--green);
    color: white;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
}

/* Toast bildirimleri */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--ink);
    color: var(--cream);
    padding: 14px 22px;
    border-radius: var(--radius);
    font-size: 14px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    animation: toastIn 0.3s ease;
    max-width: 320px;
}

.toast.error {
    background: var(--red-deep);
}

.toast.success {
    background: var(--green);
}

@keyframes toastIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =============================================
   AKTİVİTE FEED
   ============================================= */
.activity-feed {
    max-height: 700px;
    overflow-y: auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    background: var(--paper);
}

.activity-item {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
    align-items: flex-start;
    transition: background 0.15s;
}

.activity-item:last-child { border-bottom: none; }

.activity-item:hover {
    background: var(--cream-warm);
}

.activity-time {
    font-family: var(--font-display);
    font-size: 13px;
    color: var(--ink-mute);
    font-variant-numeric: tabular-nums;
    padding-top: 2px;
    flex-shrink: 0;
}

.activity-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    line-height: 1.5;
}

.activity-family {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.activity-text {
    font-size: 14px;
    color: var(--ink-soft);
    flex: 1;
    min-width: 200px;
}

.activity-text strong {
    color: var(--ink);
    font-weight: 600;
}

@media (max-width: 700px) {
    .activity-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .activity-time {
        font-size: 12px;
    }
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--line);
    background: var(--paper);
}

.site-footer p {
    color: var(--ink-mute);
    font-size: 13px;
    margin: 0;
}

.site-footer a {
    color: var(--ink-mute);
    text-decoration: underline;
    font-style: italic;
}

/* =============================================
   LOADING & EMPTY
   ============================================= */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--ink-mute);
    font-style: italic;
    font-family: var(--font-display);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-mute);
    background: var(--paper);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--line);
}

.empty-state strong {
    display: block;
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    margin-bottom: 6px;
}

/* =============================================
   ADMIN PANEL
   ============================================= */
.admin-page {
    padding: 60px 0;
}

.admin-page h1 {
    font-family: var(--font-display);
    font-size: 42px;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin: 32px 0 24px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 0;
    overflow-x: auto;
}

.admin-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: var(--ink-mute);
    font-weight: 600;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-tab:hover { color: var(--ink); }

.admin-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
}

.admin-panel {
    background: var(--paper);
    padding: 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.admin-panel h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    background: var(--paper);
    padding: 48px 40px;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px -20px rgba(31, 26, 20, 0.2);
    border-top: 4px solid var(--red);
}

.login-card h1 {
    font-family: var(--font-display);
    font-size: 32px;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.login-card p {
    color: var(--ink-mute);
    margin: 0 0 24px;
}

.login-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-card input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    background: white;
    margin-bottom: 18px;
}

.login-card input:focus {
    outline: none;
    border-color: var(--red);
}

.login-card button {
    width: 100%;
    padding: 14px;
    background: var(--ink);
    color: var(--cream);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.login-card button:hover { background: var(--red); }

.error-msg {
    background: rgba(184, 50, 39, 0.1);
    color: var(--red-deep);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 18px;
    border-left: 3px solid var(--red);
}

.success-msg {
    background: rgba(31, 81, 50, 0.1);
    color: var(--green);
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    margin-bottom: 18px;
    border-left: 3px solid var(--green);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-stats {
        gap: 20px;
    }
    .stat strong { font-size: 28px; }
    .main-nav { gap: 16px; }
    .main-nav a:not(.nav-admin) { display: none; }
    .hero { padding: 50px 0 30px; }
    .section { padding: 60px 0; }
    .countdown-card { padding: 28px 22px; }
    .cd-num { font-size: 26px; }
    .expense-row {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "desc amount"
            "family family";
        gap: 8px;
    }
    .expense-row > div:first-child { grid-area: desc; }
    .expense-amount { grid-area: amount; }
    .expense-family { grid-area: family; justify-self: start; }
    .hero-meta { gap: 24px; flex-wrap: wrap; }
}

@media (max-width: 500px) {
    .container { padding: 0 16px; }
    .countdown-grid { gap: 6px; }
    .cd-block { padding: 12px 4px; }
    .cd-num { font-size: 22px; }
    .form-row { flex-direction: column; }
    .form-row input, .form-row select { min-width: 100%; }
    .hero-title { font-size: 44px; }
}

/* Print için */
@media print {
    .site-header, .site-footer, .add-item-form, .nav-admin { display: none; }
    body { background: white; }
}
