/* assets/css/style.css */

/* Temel değişkenler */
:root {
    --bg-light: #f4f5f7;
    --bg-dark: #020617;
    --card-light: #ffffff;
    --card-dark: #020617;
    --text-light: #e5e7eb;
    --text-dark: #e5e7eb;
    --text-dark-main: #111827;
    --primary: #3b82f6;
    --danger: #ef4444;
    --border: #1f2937;
    --radius: 16px;
    --shadow: 0 18px 35px rgba(0,0,0,0.35);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

body.theme-light {
    background: radial-gradient(circle at top, #e0f2fe 0, #f9fafb 40%, #e5e7eb 100%);
    color: var(--text-dark-main);
}

body.theme-dark {
    background: radial-gradient(circle at top, #020617 0, #020617 40%, #020617 100%);
    color: var(--text-light);
}

.app-container {
    width: 100%;
    max-width: 1400px;
    padding: 20px;
}

/* LOGIN */

.login-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(30,64,175,0.96));
    color: #e5e7eb;
}

.login-card h2 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 18px;
}

.logo-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin-bottom: 4px;
}

.logo-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 8px;
}

.login-card h1 {
    margin: 0;
    letter-spacing: 0.12em;
    font-weight: 800;
    font-size: 24px;
}

label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,0.8);
    color: #e5e7eb;
    outline: none;
    transition: border 0.2s ease-out, box-shadow 0.2s ease-out, background 0.2s;
}

input:focus, select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(59,130,246,0.6);
}

.btn {
    display: inline-block;
    border-radius: 999px;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out, background 0.15s;
}

.btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 10px 20px rgba(37,99,235,0.45);
}

.btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(37,99,235,0.65);
}

.btn.small {
    padding: 4px 10px;
    font-size: 12px;
}

.btn.danger {
    background: var(--danger);
    color: #fff;
}

.bottom-row {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.bottom-row a {
    color: #bfdbfe;
    text-decoration: none;
}

.bottom-row a:hover {
    text-decoration: underline;
}

.error-msg {
    margin-top: 10px;
    color: #fecaca;
    font-size: 13px;
}

/* TOPBAR & CONTENT */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

body.theme-light .topbar {
    background: rgba(255,255,255,0.9);
    color: var(--text-dark-main);
}

body.theme-dark .topbar {
    background: rgba(15,23,42,0.95);
    color: var(--text-light);
}

.topbar .title {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.12em;
}

.topbar .divider {
    margin: 0 8px;
    opacity: 0.5;
}

.content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr);
    gap: 18px;
}

.card-fullwidth {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* CARD */

.card {
    padding: 16px 18px;
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0,0,0,0.35);
}

body.theme-light .card {
    background: var(--card-light);
    color: var(--text-dark-main);
}

body.theme-dark .card {
    background: #020617;
    color: var(--text-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
}

.table-wrapper {
    border-radius: 12px;
    max-height: 450px;
    overflow: auto;
}

/* INLINE FORMS */

.inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.inline-form input,
.inline-form select {
    flex: 1 1 120px;
}

.pagination {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pager-info {
    font-size: 12px;
    opacity: 0.8;
}

.per-page-label {
    font-size: 12px;
}

.per-page-label select {
    width: auto;
    margin-left: 4px;
}

/* ---------------------------------- */
/* YENİ TABLO TASARIMI + INLINE EDIT */
/* ---------------------------------- */

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 17px; /* büyüttüm */
}

/* Başlık satırı */
.data-table thead th {
    padding: 18px 15px; /* büyütüldü */
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    border-bottom: 1px solid rgba(148,163,184,0.5);
    text-align: center;
}

/* Header arka planları */
body.theme-dark .data-table thead th {
    background: #020617;
    color: #e5e7eb;
}

body.theme-light .data-table thead th {
    background: #e5e7eb;
    color: #111827;
}

/* Gövde satırları */
.data-table tbody tr {
    min-height: 60px; /* yüksek satır */
    font-size: 16px;
    transition: 0.2s;
}

/* Satır arka planları */
body.theme-dark .data-table tbody tr {
    background: rgba(15,23,42,0.95);
}

body.theme-light .data-table tbody tr {
    background: #ffffff;
}

/* Hover */
.data-table tbody tr:hover {
    background: rgba(59,130,246,0.14);
}

/* Hücreler */
.data-table td {
    padding: 16px 15px;
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(148,163,184,0.4);
}

/* Kolon ayırıcı çizgiler */
.data-table thead th:not(:last-child),
.data-table tbody td:not(:last-child) {
    border-right: 1px solid rgba(148,163,184,0.55);
}

.edit-icon {
    opacity: 0;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 17px;
    color: #38bdf8;
    transition: 0.15s;
}

td:hover .edit-icon {
    opacity: 1;
}

/* inline input */
.inline-input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid #4b5563;
    outline: none;
    font-size: 15px;
}

/* ---------------------------------- */
/* SWITCH — Kırmızı/Kapalı → Yeşil/Açık */
/* ---------------------------------- */

.switch-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.switch-input { display: none; }

.switch-slider {
    width: 52px;
    height: 28px;
    background: #c0392b;
    border-radius: 30px;
    position: relative;
    transition: all 0.25s ease;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: inset 0px 0px 6px rgba(0,0,0,0.4);
}

.switch-slider::after {
    content: "";
    width: 22px;
    height: 22px;
    background: white;
    position: absolute;
    top: 2px;
    left: 2px;
    border-radius: 50%;
    transition: all 0.25s ease;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.switch-input:checked + .switch-slider {
    background: #2ecc71;
}

.switch-input:checked + .switch-slider::after {
    left: 27px;
}

.switch-slider:hover {
    box-shadow: 0 0 8px rgba(0,255,150,0.6);
    transform: scale(1.05);
}

/* ---------------------------------- */
/* ARAMA KUTUSU */
/* ---------------------------------- */

.search-box {
    width: 260px;
    padding: 10px 13px;
    font-size: 15px;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.5);
    background: var(--bg-light);
    color: var(--text-dark-main);
    margin-bottom: 10px;
}

body.theme-dark .search-box {
    background: #0f172a;
    color: var(--text-light);
    border-color: #334155;
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.table-footer .timezone-mini {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-footer .timezone-mini select {
    font-size: 12px;
    padding: 3px 6px;
    border-radius: 6px;
}
