:root {
    --bg: #f3efe6;
    --bg-2: #ebe4d6;
    --ink: #1c1914;
    --muted: #6b6458;
    --line: #d7cfbf;
    --panel: rgba(255, 252, 246, 0.88);
    --accent: #0f6b5c;
    --accent-2: #0b5347;
    --danger: #9b2c2c;
    --ok: #1f6b3a;
    --shadow: 0 18px 50px rgba(28, 25, 20, 0.08);
    --radius: 18px;
    --font: "DM Sans", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(1200px 600px at 10% -10%, #dceee8 0%, transparent 55%),
        radial-gradient(900px 500px at 100% 0%, #f0e2c8 0%, transparent 50%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    padding: 28px 22px;
    border-right: 1px solid var(--line);
    background: rgba(255, 252, 246, 0.55);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
}

.brand-center {
    justify-content: center;
    margin-bottom: 18px;
}

.brand strong { display: block; font-size: 1.1rem; }
.brand small { color: var(--muted); }

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #f7fff9;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar nav a {
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(15, 107, 92, 0.1);
    color: var(--accent-2);
}

.sidebar-foot { margin-top: auto; }
.sidebar-foot a { color: var(--muted); }

.main {
    padding: 36px 40px 60px;
}

.main-solo {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
    padding: 40px 20px;
}

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 28px;
}

.page-head h1 {
    margin: 0 0 6px;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.page-head p,
.muted {
    margin: 0;
    color: var(--muted);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fffdf8;
    color: var(--ink);
    border-radius: 999px;
    padding: 11px 18px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #f7fff9;
}

.btn-primary:hover { background: var(--accent-2); }

.btn-danger {
    color: var(--danger);
    border-color: #e7c2c2;
    background: #fff7f7;
}

.btn-small {
    padding: 8px 12px;
    font-size: 0.9rem;
}

.panel,
.table-wrap,
.empty,
.auth-card {
    background: #fffdf8;
    border: 1px solid #cfc6b4;
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(28, 25, 20, 0.07);
}

.panel, .empty, .auth-card { padding: 28px; }
.auth-card { width: min(420px, 100%); }

.form {
    display: grid;
    gap: 18px;
}

label {
    display: grid;
    gap: 8px;
}

label > span { font-weight: 600; font-size: 0.95rem; }

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
textarea,
select {
    width: 100%;
    border: 1.5px solid #b9ae9a;
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    color: var(--ink);
    box-sizing: border-box;
    box-shadow: inset 0 1px 2px rgba(28, 25, 20, 0.04);
}

textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6458' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(15, 107, 92, 0.25);
    border-color: var(--accent);
}

label small,
fieldset small {
    color: var(--muted);
    font-size: 0.86rem;
}

.check {
    grid-template-columns: 18px 1fr;
    align-items: center;
}

fieldset {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 18px;
    margin: 0;
    display: grid;
    gap: 14px;
}

legend {
    padding: 0 8px;
    font-weight: 700;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.settings-form { gap: 22px; }

.table-wrap { overflow: auto; }

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}

th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.domain {
    font-weight: 700;
    color: var(--ink);
}

.mono { font-family: var(--mono); font-size: 0.86rem; }

.actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    white-space: nowrap;
}

.actions form { margin: 0; }

.linkish {
    border: 0;
    background: none;
    padding: 0;
    color: var(--accent);
    font: inherit;
    cursor: pointer;
}

.empty {
    text-align: center;
    padding: 64px 24px;
}

.empty h2 { margin-top: 0; }

.flash {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.flash-success {
    background: #e8f6ec;
    border-color: #bfe0c8;
    color: var(--ok);
}

.flash-error {
    background: #fdecec;
    border-color: #efc2c2;
    color: var(--danger);
}

.checklist ul {
    margin: 8px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

.success-panel h2 { margin-top: 0; }

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin: 20px 0;
}

.meta-grid dt {
    color: var(--muted);
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.meta-grid dd {
    margin: 0;
    font-weight: 600;
}

.row-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.logs {
    margin-top: 20px;
    color: var(--muted);
}

.logs ul {
    font-family: var(--mono);
    font-size: 0.84rem;
}

body.is-busy #create-btn {
    opacity: 0.7;
    pointer-events: none;
}

body.is-busy #create-btn::after {
    content: " · kuruluyor…";
}

.dns-guide {
    margin-bottom: 22px;
    padding: 24px;
}

.dns-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: start;
    margin-bottom: 16px;
}

.dns-head p { margin-top: 6px; }

.dns-ip-box {
    min-width: 220px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.dns-ip-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.dns-table-wrap { box-shadow: none; border: 1px solid var(--line); }

.dns-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(15, 107, 92, 0.1);
    color: var(--accent-2);
    font-weight: 700;
    font-size: 0.82rem;
}

.dns-tips {
    margin: 14px 0 0;
    padding-left: 18px;
}

.create-dns-warn {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff7e8;
    border: 1px solid #ead2a4;
    color: #6a4b12;
}

@media (max-width: 960px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar nav { flex-direction: row; flex-wrap: wrap; }
    .main { padding: 24px 18px 40px; }
    .grid-2,
    .meta-grid { grid-template-columns: 1fr; }
    .page-head { flex-direction: column; align-items: start; }
    .dns-head { flex-direction: column; }
    .dns-ip-box { width: 100%; min-width: 0; }
}

