:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --border: #e2e5ea;
    --text: #1c2128;
    --muted: #6b7280;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --green: #16a34a;
    --green-bg: #dcfce7;
    --red: #dc2626;
    --red-bg: #fee2e2;
    --gray-bg: #eef0f3;
    --radius: 8px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

/* --- Naviqasiya --- */
.nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 28px;
    height: 56px;
}
.brand {
    font-weight: 700;
    font-size: 16px;
    color: var(--text);
    text-decoration: none;
}
.nav-links { display: flex; gap: 20px; }
.nav-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 20px 60px;
}
h1 { font-size: 22px; margin: 0 0 20px; }
h2 { font-size: 16px; margin: 0 0 14px; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 16px;
}

/* --- Statistika --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
}
.stat-value { font-size: 26px; font-weight: 700; }
.stat-label { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* --- Cedvel --- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    font-weight: 600;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
}
td {
    padding: 11px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* --- Formalar --- */
label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}
input[type=text], input[type=password], input[type=number], input[type=time],
select, textarea {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: var(--text);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
textarea { resize: vertical; min-height: 90px; }
.field { margin-bottom: 15px; }
.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}
.checkbox-row label { margin: 0; }
.checkbox-row input { width: auto; }

/* --- Duymeler --- */
.btn {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    background: var(--accent);
    color: #fff;
}
.btn:hover { background: var(--accent-hover); }
.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover { background: var(--gray-bg); }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form { display: inline; }

/* --- Nisanlar --- */
.badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red   { background: var(--red-bg);   color: var(--red); }
.badge-gray  { background: var(--gray-bg);  color: var(--muted); }

/* --- Bildirisler --- */
.alert {
    padding: 11px 15px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
}
.alert-success { background: var(--green-bg); color: #14532d; }
.alert-error   { background: var(--red-bg);   color: #7f1d1d; }
.alert-warn    { background: #fef3c7;         color: #78350f; }

/* --- Diger --- */
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.empty {
    text-align: center;
    padding: 36px 20px;
    color: var(--muted);
    font-size: 14px;
}
.pagination { display: flex; gap: 8px; margin-top: 18px; align-items: center; }

.article-body {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 22px;
    background: #fff;
}
.article-body h2 { font-size: 18px; margin: 22px 0 10px; }
.article-body p { margin: 0 0 12px; }
.article-body ul { margin: 0 0 12px 20px; }

.serp-preview {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: #fff;
}
.serp-title { color: #1a0dab; font-size: 17px; margin-bottom: 2px; }
.serp-url { color: var(--green); font-size: 13px; margin-bottom: 3px; }
.serp-desc { color: #4d5156; font-size: 13px; }

/* --- Giris sehifesi --- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    width: 100%;
    max-width: 380px;
}
.login-brand {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}
.login-sub {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin: 4px 0 24px;
}
