/* DizeTeknik — ortak tema (landing, müşteri portalı, yönetim) */

:root {
    --bg: #060610;
    --bg-elevated: #0e0e1a;
    --bg-card: #12121f;
    --border: rgba(255, 255, 255, 0.08);
    --text: #f0f0f5;
    --text-muted: #9494a8;
    --accent: #3b9eff;
    --accent-glow: rgba(59, 158, 255, 0.35);
    --accent-warm: #ff8c42;
    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;
    --radius: 16px;
    --font: "Plus Jakarta Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body, .dize-body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #6bb5ff; }

.container {
    width: min(1120px, 92vw);
    margin-inline: auto;
}

.dize-main {
    padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
    min-height: calc(100vh - 140px);
}

.page-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0 0 0.35rem;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0 0 1.75rem;
}

/* ── Nav ── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(6, 6, 16, 0.85);
    border-bottom: 1px solid var(--border);
}

.site-nav .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text);
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active { color: var(--text); }

.nav-cta { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.65rem 1.25rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
    text-decoration: none;
    font-family: inherit;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #6366f1);
    color: #fff;
    box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover { color: #fff; box-shadow: 0 6px 32px var(--accent-glow); }

.btn-warning {
    background: linear-gradient(135deg, var(--accent-warm), #f59e0b);
    color: #111;
}

.btn-warning:hover { color: #111; }

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

.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }

/* ── Cards ── */
.dize-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.dize-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,0.15);
}

.dize-card-header h2,
.dize-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.dize-card-header-split {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dize-card-body { padding: 1.25rem; }

/* ── Forms ── */
.dize-form label,
.dize-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-muted);
}

.dize-input,
.dize-select,
.dize-textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.25);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
}

.dize-input:focus,
.dize-select:focus,
.dize-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.dize-textarea { min-height: 100px; resize: vertical; }
.dize-textarea.tall { min-height: 160px; }

.dize-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.dize-check input { width: auto; margin: 0; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0 1rem;
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* ── Alerts ── */
.dize-alert {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.dize-alert-success { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35); color: #6ee7b7; }
.dize-alert-danger  { background: rgba(248, 113, 113, 0.12); border: 1px solid rgba(248, 113, 113, 0.35); color: #fca5a5; }
.dize-alert-warning { background: rgba(251, 191, 36, 0.12); border: 1px solid rgba(251, 191, 36, 0.35); color: #fde68a; }
.dize-alert-info    { background: rgba(59, 158, 255, 0.12); border: 1px solid rgba(59, 158, 255, 0.35); color: #93c5fd; }

/* ── Tables ── */
.dize-table-wrap { overflow-x: auto; }

.dize-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

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

.dize-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dize-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Lists / badges ── */
.dize-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dize-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    transition: background 0.15s;
}

a.dize-list-item { text-decoration: none; }
a.dize-list-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }

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

.dize-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

.dize-badge-success { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.dize-badge-muted   { background: rgba(255,255,255,0.08); color: var(--text-muted); }
.dize-badge-accent  { background: rgba(59, 158, 255, 0.15); color: var(--accent); }

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    vertical-align: middle;
}
.status-dot.active {
    background: #34d399;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.65);
}
.status-dot.inactive {
    background: #f87171;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.55);
}

code, .mono {
    font-family: ui-monospace, "Cascadia Code", monospace;
    font-size: 0.85em;
    background: rgba(0,0,0,0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
}

/* ── KPI / özet kartları (müşteri portalı kasa) ── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.kpi-card strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

/* ── Yönetim paneli layout (yalnızca /admin/) ── */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    align-items: start;
}

.admin-sidebar {
    position: sticky;
    top: 5.5rem;
}

.admin-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.admin-menu a {
    display: block;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.admin-menu a:hover,
.admin-menu a.active {
    background: rgba(59, 158, 255, 0.1);
    color: var(--text);
}

.kpi-grid,
.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card,
.admin-stat {
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.kpi-card strong,
.admin-stat strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.kpi-card span,
.admin-stat span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.package-editor {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    background: rgba(0,0,0,0.15);
}

.package-editor h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-wrap {
    max-width: 420px;
    margin: 2rem auto;
}

.json-preview {
    margin: 0;
    padding: 1rem 1.15rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: ui-monospace, "JetBrains Mono", monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    color: #b8c4d8;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
}

input[type="file"].dize-input {
    padding: 0.5rem;
}

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

/* ── Footer ── */
.site-footer {
    padding: 2rem 0;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

.footer-logo {
    vertical-align: middle;
    border-radius: 8px;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; }
    .brand-text { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
