/* ============================================================
   Zenith Zirve'26 — Panel arayüzü (admin & IK)
   styles.css değişkenlerini ve fontlarını kullanır.
   ============================================================ */

.panel-body {
    min-height: 100vh;
    background: var(--gradient-hero);
}

/* Üst bar */
.panel-topbar {
    background: var(--glass-bg);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 0;
    z-index: 100;
}

.panel-topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 24px;
    flex-wrap: wrap;
}

.panel-brand {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.panel-brand .logo {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.panel-brand .tag {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-foreground);
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.panel-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

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

/* Butonlar */
.pbtn {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    line-height: 1;
}

.pbtn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 58, 138, 0.2);
}
.pbtn-primary:hover { background: var(--secondary); transform: translateY(-1px); }

.pbtn-ghost {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.pbtn-ghost:hover { background: rgba(30, 58, 138, 0.06); }

.pbtn-danger {
    background: transparent;
    color: #b91c1c;
    border-color: #fca5a5;
}
.pbtn-danger:hover { background: #fef2f2; border-color: #ef4444; }

.pbtn-ok {
    background: #16a34a;
    color: #fff;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}
.pbtn-ok:hover { background: #15803d; transform: translateY(-1px); }

.pbtn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; border-radius: 8px; }

.pbtn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Sayfa içeriği */
.panel-main { padding: 2.5rem 0 4rem; }

.panel-head {
    margin-bottom: 2rem;
}

.panel-head h1 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 2.2rem;
    color: var(--primary);
    letter-spacing: -0.02em;
}

.panel-head p { color: var(--muted-foreground); margin-top: 0.25rem; }

/* Sekmeler */
.panel-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.panel-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1.25rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.panel-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

.panel-pane { display: none; }
.panel-pane.active { display: block; }

/* Kartlar / listeler */
.card-list { display: grid; gap: 1.25rem; }

.editor-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.editor-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.editor-card-head .idx {
    width: 34px; height: 34px;
    flex: 0 0 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
}

.editor-card-head .title { font-weight: 700; color: var(--foreground); flex: 1; }

/* Form alanları */
.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

.field label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--foreground);
    margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    color: var(--foreground);
    background: #fff;
    transition: border-color 0.2s;
}

.field input:focus,
.field textarea:focus,
.field select:focus { outline: none; border-color: var(--primary); }

.field textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.field-hint { font-size: 0.8rem; color: var(--muted-foreground); margin-top: 0.3rem; }

/* Konuşmacı satırı (fotoğraf + ad) */
.spk-rows { display: grid; gap: 0.75rem; }
.spk-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1.4fr auto;
    gap: 0.6rem;
    align-items: center;
}

.thumb {
    width: 46px; height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    background: var(--muted);
}

/* Tablo (IK başvuruları) */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    background: #fff;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 640px;
}

table.data-table th,
table.data-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

table.data-table thead th {
    position: sticky;
    top: 0;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

table.data-table tbody tr:nth-child(even) { background: var(--muted); }
table.data-table tbody tr:hover { background: rgba(59, 130, 246, 0.08); }

/* Başvuru kartları (okunması kolay görünüm) */
.app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.app-card {
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow-card);
    padding: 1.25rem 1.35rem;
}

.app-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.app-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.3rem;
    color: var(--primary);
    line-height: 1.2;
}

.app-type {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    flex: 0 0 auto;
}

.app-meta {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 0.6rem;
}

.app-fields { display: grid; gap: 0.7rem; }

.app-field { display: grid; gap: 0.15rem; }

.app-field .lbl {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--muted-foreground);
    text-transform: uppercase;
}

.app-field .val {
    color: var(--foreground);
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.5;
}

.val-more {
    align-self: start;
    margin-top: 0.15rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary);
    cursor: pointer;
}

.val-more:hover { text-decoration: underline; }

/* Onay durumu satırı + rozet */
.app-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.app-actions .spacer { flex: 1; }

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-pill.pending { background: #fef3c7; color: #92400e; }
.status-pill.ok { background: #dcfce7; color: #166534; }
.status-pill.rejected { background: #fee2e2; color: #991b1b; }
.status-pill.resend { background: #e0e7ff; color: #3730a3; }

.toolbar select { cursor: pointer; }

/* ===== Liste görünümü (Delege / Delegasyon bölümleri) ===== */
.app-section-head {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin: 1.75rem 0 0.85rem;
}
.app-section-head:first-child { margin-top: 0; }
.app-section-head .sec-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
}
.app-section-head .sec-count {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.22rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.app-rows { display: grid; gap: 0.6rem; }

.app-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    padding: 0.7rem 0.9rem;
}

.app-row-main {
    flex: 1;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-align: left;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    transition: background 0.2s;
}
.app-row-main:hover { background: rgba(30, 58, 138, 0.06); }
.app-row-name { font-weight: 700; color: var(--foreground); font-size: 1.02rem; }
.app-row-sub { color: var(--muted-foreground); font-size: 0.85rem; }

.app-row-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

/* ===== Detay modalı ===== */
.detail-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1100;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1.5rem;
    overflow: auto;
}
.detail-modal.open { display: flex; }

.detail-modal-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    width: 100%;
    max-width: 640px;
    padding: 2rem;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}
.detail-close {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--muted-foreground);
    cursor: pointer;
    padding: 0.25rem;
}
.detail-close:hover { color: var(--foreground); }
.detail-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
    padding-right: 2rem;
}
.detail-title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.6rem;
    color: var(--primary);
    line-height: 1.2;
}
.detail-meta {
    font-size: 0.8rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

/* Araç çubuğu / filtre */
.toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.toolbar input[type="search"],
.toolbar select {
    padding: 0.55rem 0.8rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.9rem;
    background: #fff;
}

.toolbar .grow { flex: 1; min-width: 180px; }

.count-badge {
    background: var(--muted);
    color: var(--primary);
    border-radius: 999px;
    padding: 0.3rem 0.8rem;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Giriş ekranı */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--gradient-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    padding: 2.5rem 2rem;
    text-align: center;
}

.login-card .logo {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary);
}

.login-card h1 { font-size: 1.2rem; margin: 0.25rem 0 1.5rem; color: var(--foreground); }

.login-card .field { text-align: left; }

/* Durum mesajları */
.status {
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    display: none;
}
.status.show { display: block; }
.status.ok { background: #ecfdf5; color: #065f46; border: 1px solid #6ee7b7; }
.status.err { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }
.status.info { background: #eff6ff; color: #1e40af; border: 1px solid #93c5fd; }

/* Yükleniyor / boş durum */
.empty-state {
    text-align: center;
    color: var(--muted-foreground);
    padding: 3rem 1rem;
}
.empty-state .ico { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }

/* Yapışkan kaydet çubuğu */
.save-bar {
    position: sticky;
    bottom: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    border-top: 1px solid var(--glass-border);
    padding: 1rem 0;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.save-bar .dirty-note { margin-right: auto; color: var(--muted-foreground); font-size: 0.9rem; }

.mode-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
    border-radius: 10px;
    padding: 0.7rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.announcement-editor h2,
.announcement-management h2 {
    margin: 0 0 1.25rem;
    color: var(--primary);
    font-size: 1.25rem;
}

.announcement-management { margin-top: 2.5rem; }

.announcement-management-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.announcement-management-head h2 { margin: 0; }

.announcement-admin-date {
    display: block;
    margin: -0.45rem 0 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.8rem;
}

.announcement-admin-message {
    margin: 0;
    color: var(--foreground);
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .spk-row { grid-template-columns: 1fr; }
    .panel-head h1 { font-size: 1.8rem; }
    .announcement-management-head { align-items: flex-start; }
}
