/* AAJanda — global stiller */

:root {
    --brand: #4f46e5;
    --brand-hover: #4338ca;
    --surface: #ffffff;
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 0.875rem;
    --shadow: 0 1px 3px rgb(15 23 42 / 6%), 0 4px 16px rgb(15 23 42 / 4%);
}

.dark {
    --surface: #1e293b;
    --bg: #0f172a;
    --text: #f1f5f9;
    --muted: #94a3b8;
    --border: #334155;
    --shadow: 0 1px 3px rgb(0 0 0 / 20%), 0 4px 16px rgb(0 0 0 / 15%);
}

html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "kern" 1, "liga" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Butonlar */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 1px 2px rgb(79 70 229 / 30%);
}

.btn-primary:hover {
    background: var(--brand-hover);
}

.btn-ghost {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgb(79 70 229 / 6%);
    border-color: rgb(79 70 229 / 30%);
}

.dark .btn-ghost:hover {
    background: rgb(99 102 241 / 12%);
}

.btn-icon {
    min-width: 2.5rem;
    min-height: 2.5rem;
    padding: 0.5rem;
}

/* Kartlar */
.card {
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* Form elemanları */
.input {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgb(79 70 229 / 18%);
}

.input::placeholder {
    color: var(--muted);
}

/* Boş durum */
.empty-state {
    border-radius: 1rem;
    border: 2px dashed var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9375rem;
}

/* Takvim hücresi */
.cal-cell {
    min-height: 4.75rem;
    transition: background-color 0.15s, transform 0.1s;
}

@media (min-width: 640px) {
    .cal-cell {
        min-height: 6.5rem;
    }
}

@media (min-width: 1024px) {
    .cal-cell {
        min-height: 7.5rem;
    }
}

.cal-cell:hover {
    transform: translateY(-1px);
}

/* Flash mesaj */
.flash {
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.flash-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.dark .flash-success {
    background: rgb(6 78 59 / 25%);
    color: #6ee7b7;
    border-color: rgb(52 211 153 / 30%);
}

.flash-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dark .flash-error {
    background: rgb(127 29 29 / 25%);
    color: #fca5a5;
    border-color: rgb(248 113 113 / 30%);
}

/* Arama sayfası — yalnızca /search (iPhone Safari taşma önleme) */
.search-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: clip;
}

.search-form {
    max-width: 100%;
    box-sizing: border-box;
}

.search-form-dates {
    border: none;
    margin: 0;
    padding: 0;
    min-width: 0;
    max-width: 100%;
}

.search-form-date-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 640px) {
    .search-form-date-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.search-form-date-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.input-date {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    min-height: 2.75rem;
    font-size: 16px;
}

@supports (-webkit-touch-callout: none) {
    .search-form .input-date {
        -webkit-appearance: none;
        appearance: none;
    }

    .search-form .input-date::-webkit-date-and-time-value {
        text-align: left;
    }

    .search-form .input-date[type="text"] {
        appearance: none;
        -webkit-appearance: none;
    }
}

.search-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text);
    transition: background-color 0.15s;
}

.search-page-btn:hover {
    background: rgb(79 70 229 / 6%);
}

.search-page-btn-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.search-page-ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 0.25rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.search-pagination {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.terms-checkbox {
    accent-color: var(--brand);
}

/* Yasal metin sayfaları */
.legal-doc {
    font-size: 0.875rem;
    line-height: 1.65;
    color: var(--muted);
}

.legal-doc h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.legal-doc h2:first-child {
    margin-top: 0;
}

.legal-lead {
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text);
}

.legal-doc p {
    margin-bottom: 0.875rem;
}

.legal-doc ul,
.legal-doc ol {
    margin: 0 0 1rem 1.25rem;
}

.legal-doc li {
    margin-bottom: 0.375rem;
}

.legal-doc a {
    color: var(--brand);
    text-decoration: underline;
}

.legal-table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--border);
    padding: 0.5rem 0.625rem;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    width: 38%;
    background: rgb(79 70 229 / 5%);
    font-weight: 600;
    color: var(--text);
}

@media (max-width: 480px) {
    .legal-table,
    .legal-table tbody,
    .legal-table tr,
    .legal-table th,
    .legal-table td {
        display: block;
        width: 100%;
    }

    .legal-table th {
        border-bottom: none;
    }
}
