:root {
    --bg: #f5f5f7;
    --bg-white: #ffffff;
    --bg-soft: #fbfbfd;
    --line: rgba(0, 0, 0, 0.08);
    --line-strong: rgba(0, 0, 0, 0.12);
    --text: #1d1d1f;
    --muted: #86868b;
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --blue-press: #006edb;
    --blue-soft: rgba(0, 113, 227, 0.08);
    --success: #34c759;
    --danger: #ff3b30;
    --warn: #ff9f0a;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 22px 70px rgba(0, 0, 0, 0.12);
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
        "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.modal-open { overflow: hidden; }

a { color: inherit; text-decoration: none; }

.shell {
    width: min(1080px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

/* ——— Nav ——— */
.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0;
    padding: 0.65rem max(1.25rem, calc((100% - 1080px) / 2));
    background: rgba(251, 251, 253, 0.72);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.brand-logo {
    display: block;
    height: 30px;
    width: auto;
    max-width: 170px;
    object-fit: contain;
}

.brand-mark {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #ffc107;
}

.auth-favicon {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    background: #000;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem 0.85rem;
    flex-wrap: wrap;
}

.nav-link {
    font-size: 0.8125rem;
    color: var(--muted);
    padding: 0.35rem 0.15rem;
    transition: color 0.15s;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--text);
}

.user-chip {
    color: var(--muted);
    font-size: 0.8125rem;
    margin-left: 0.35rem;
}

/* ——— Notifications ——— */
.notify-wrap {
    position: relative;
    margin-left: 0.15rem;
}

.notify-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border: 1px solid var(--line-strong);
    border-radius: 980px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.notify-bell:hover,
.notify-bell[aria-expanded="true"] {
    background: rgba(0, 0, 0, 0.04);
}

.notify-bell.has-unread {
    border-color: rgba(255, 159, 10, 0.45);
    color: #b36b00;
}

.notify-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.25rem;
    border-radius: 980px;
    background: #ff3b30;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.05rem;
    text-align: center;
}

.notify-panel {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    width: min(360px, calc(100vw - 2rem));
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow: hidden;
    animation: rise 0.2s ease;
}

.notify-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
}

.notify-panel-head strong {
    font-size: 0.95rem;
    letter-spacing: -0.02em;
}

.linkish {
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
}

.linkish:hover { text-decoration: underline; }

.notify-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.notify-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 320px;
    overflow: auto;
}

.notify-list li {
    border-bottom: 1px solid var(--line);
}

.notify-list li.is-unread {
    background: rgba(255, 159, 10, 0.06);
}

.notify-list a {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
}

.notify-list strong {
    font-size: 0.875rem;
    letter-spacing: -0.015em;
}

.notify-list span {
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notify-panel-foot {
    display: block;
    padding: 0.8rem 1rem;
    text-align: center;
    color: var(--blue);
    font-size: 0.875rem;
    font-weight: 500;
    border-top: 1px solid var(--line);
}

.notify-panel-foot:hover { background: rgba(0, 0, 0, 0.02); }

.notify-page-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.notify-page-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.notify-page-item:last-child { border-bottom: none; }

.notify-page-item.is-unread {
    background: rgba(255, 159, 10, 0.05);
    box-shadow: inset 3px 0 0 #ff9f0a;
}

.notify-page-main {
    flex: 1 1 260px;
    min-width: 0;
}

.notify-page-main strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.notify-page-main p {
    margin: 0 0 0.35rem;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.45;
}

/* ——— Auth ——— */
.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.auth-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border-bottom: 1px solid var(--line);
    background: rgba(251, 251, 253, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.auth-page {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 2rem 1.25rem;
}

.auth-hero {
    width: min(440px, 100%);
    text-align: center;
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-hero h1 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.85rem, 5vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.auth-sub {
    margin: 0 0 2rem;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.47;
    letter-spacing: -0.01em;
}

.auth-alert {
    margin: 0 0 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 59, 48, 0.08);
    border: 1px solid rgba(255, 59, 48, 0.16);
    color: #d70015;
    font-size: 0.9rem;
    text-align: left;
}

.auth-form { text-align: left; }

.auth-fields {
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-fields:focus-within {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}

.auth-field {
    position: relative;
    display: block;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    letter-spacing: inherit;
}

.auth-field + .auth-field {
    border-top: 1px solid #d2d2d7;
}

.auth-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #86868b;
    font-size: 1.0625rem;
    font-weight: 400;
    pointer-events: none;
    transition: top 0.15s ease, font-size 0.15s ease, transform 0.15s ease, color 0.15s ease;
    z-index: 1;
}

.auth-field input {
    display: block;
    width: 100%;
    padding: 1.4rem 1rem 0.55rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    font: inherit;
    font-size: 1.0625rem;
    color: var(--text);
    letter-spacing: -0.015em;
}

.auth-field input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.auth-field.is-filled .auth-label,
.auth-field:focus-within .auth-label,
.auth-field:has(input:not(:placeholder-shown)) .auth-label,
.auth-field:has(input:-webkit-autofill) .auth-label {
    top: 0.5rem;
    transform: none;
    font-size: 0.72rem;
    color: var(--muted);
}

.auth-field-password input {
    padding-right: 4.75rem;
}

.auth-toggle {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.35rem 0.4rem;
    z-index: 2;
}

.auth-toggle:hover {
    text-decoration: underline;
}

.auth-submit {
    margin-top: 1.25rem;
}

.auth-help {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.auth-help strong { color: var(--text); font-weight: 600; }

.auth-footer {
    padding: 1.5rem 1rem 2rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    border-top: 1px solid var(--line);
}

.auth-footer p { margin: 0; }

/* ——— Forms ——— */
.form-stack { display: grid; gap: 1rem; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

label {
    display: grid;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: -0.01em;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text);
    font: inherit;
    font-size: 1.0625rem;
    letter-spacing: -0.01em;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.2);
}

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

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.7rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 980px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, color 0.2s, border-color 0.2s;
}

.btn:hover { background: var(--blue-hover); }
.btn:active { background: var(--blue-press); transform: scale(0.98); }

.btn-sm {
    padding: 0.4rem 0.85rem;
    font-size: 0.8125rem;
}

.btn-ghost {
    background: transparent;
    border-color: var(--line-strong);
    color: var(--text);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: var(--line-strong);
}

.btn-danger {
    background: transparent;
    border-color: rgba(255, 59, 48, 0.28);
    color: var(--danger);
}

.btn-danger:hover { background: rgba(255, 59, 48, 0.06); }

.btn-block {
    width: 100%;
    border-radius: var(--radius-sm);
    padding: 0.9rem 1.15rem;
    font-size: 1.0625rem;
}

/* ——— Page ——— */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin: 0.5rem 0 1.5rem;
    animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.page-head h1 {
    margin: 0;
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.page-head p {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 1.125rem;
    letter-spacing: -0.015em;
    max-width: 34rem;
}

.actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.alert-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-bottom: 1.25rem;
    padding: 0.95rem 1.15rem;
    border-radius: 14px;
    background: rgba(255, 159, 10, 0.12);
    border: 1px solid rgba(255, 159, 10, 0.22);
    color: #9a6700;
    font-size: 0.9375rem;
    animation: rise 0.4s ease both;
}

.alert-banner a {
    color: var(--blue);
    font-weight: 500;
}

.alert-banner .dot { opacity: 0.5; }

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.35rem;
    animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.04s both;
}

.stat {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1.15rem 1.2rem;
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.stat:hover {
    transform: translateY(-1px);
    border-color: rgba(0, 113, 227, 0.25);
}

.stat.is-active {
    border-color: rgba(0, 113, 227, 0.4);
    box-shadow: 0 0 0 3px var(--blue-soft), var(--shadow);
}

.stat-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.04);
    color: var(--muted);
}

.stat-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.stat-body {
    min-width: 0;
}

.stat strong {
    display: block;
    font-size: 1.85rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-body > span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.8125rem;
}

.stat-total .stat-icon {
    background: rgba(0, 113, 227, 0.1);
    color: #0071e3;
}

.stat-aktif .stat-icon {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.stat-yaklasan .stat-icon {
    background: rgba(255, 159, 10, 0.14);
    color: #b36b00;
}

.stat-dolmus .stat-icon {
    background: rgba(255, 59, 48, 0.1);
    color: #d70015;
}

.stat-aktif.is-active {
    border-color: rgba(52, 199, 89, 0.45);
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.12), var(--shadow);
}

.stat-yaklasan.is-active {
    border-color: rgba(255, 159, 10, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 159, 10, 0.14), var(--shadow);
}

.stat-dolmus.is-active {
    border-color: rgba(255, 59, 48, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1), var(--shadow);
}

.panel {
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}

.toolbar-left,
.toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.search {
    flex: 1 1 200px;
    max-width: 280px;
    border-radius: 980px;
    background: rgba(0, 0, 0, 0.04);
    border-color: transparent;
    padding: 0.65rem 1rem;
    font-size: 0.9375rem;
}

.search:focus {
    background: var(--bg-white);
    border-color: var(--blue);
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 980px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    transition: background 0.15s, color 0.15s;
}

.chip em {
    font-style: normal;
    opacity: 0.7;
}

.chip:hover { background: rgba(0, 0, 0, 0.04); color: var(--text); }

.chip.is-active {
    background: var(--text);
    color: #fff;
}

.chip.is-active em { opacity: 0.7; }

.sort-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.sort-label select {
    width: auto;
    padding: 0.45rem 0.7rem;
    font-size: 0.8125rem;
    border-radius: 980px;
}

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1.15rem;
    background: var(--blue-soft);
    border-bottom: 1px solid rgba(0, 113, 227, 0.12);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--blue);
}

.table-wrap { overflow-x: auto; }

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

th, td {
    padding: 0.95rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

th {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: -0.01em;
}

tr:last-child td { border-bottom: none; }

tbody tr { transition: background 0.15s; }
tbody tr:hover { background: rgba(0, 0, 0, 0.015); }

.col-check { width: 2.5rem; }
.col-actions {
    width: 1%;
    white-space: nowrap;
    vertical-align: middle;
}

.col-check input {
    width: 1rem;
    height: 1rem;
    padding: 0;
    accent-color: var(--blue);
}

.domain-name {
    font-weight: 560;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.domain-link {
    color: var(--text);
    transition: color 0.15s;
}

.domain-link:hover { color: var(--blue); }

.meta {
    color: var(--muted);
    font-size: 0.8125rem;
    margin-top: 0.2rem;
    letter-spacing: -0.01em;
}

.notes-cell {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 980px;
    font-size: 0.72rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted);
    white-space: nowrap;
}

.badge-aktif {
    background: rgba(52, 199, 89, 0.12);
    color: #248a3d;
}

.badge-pasif {
    background: rgba(0, 0, 0, 0.05);
    color: var(--muted);
}

.badge-suresi-dolmak-uzere {
    background: rgba(255, 159, 10, 0.14);
    color: #b36b00;
}

.badge-suresi-dolmus {
    background: rgba(255, 59, 48, 0.1);
    color: #d70015;
}

.expiry { font-size: 0.875rem; letter-spacing: -0.01em; }
.expiry-ok { color: var(--text); }
.expiry-soon { color: #b36b00; font-weight: 500; }
.expiry-critical,
.expiry-expired { color: #d70015; font-weight: 560; }

.urgency-critical td:first-child,
.urgency-expired td:first-child {
    box-shadow: inset 3px 0 0 var(--danger);
}

.urgency-soon td:first-child {
    box-shadow: inset 3px 0 0 var(--warn);
}

.row-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    white-space: nowrap;
}

.row-actions .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.empty {
    padding: 4rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.empty strong {
    display: block;
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

/* ——— Editor page (add / edit) ——— */
.back-link {
    display: inline-block;
    margin-bottom: 1.5rem;
    color: var(--blue);
    font-size: 0.9375rem;
    font-weight: 500;
}

.back-link:hover { text-decoration: underline; }

.editor-page {
    width: min(560px, 100%);
    margin: 0 auto;
    animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.editor-hero {
    margin-bottom: 1.75rem;
    text-align: center;
}

.editor-hero h1 {
    margin: 0 0 0.55rem;
    font-size: clamp(2.4rem, 6vw, 3.2rem);
    font-weight: 600;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.editor-hero p {
    margin: 0 auto;
    max-width: 28rem;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.45;
    letter-spacing: -0.015em;
}

.editor-form {
    display: grid;
    gap: 1.25rem;
}

.editor-card {
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

.editor-field {
    position: relative;
    display: grid;
    gap: 0.4rem;
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.editor-field-notes { border-bottom: none; }

.editor-field > label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: -0.01em;
}

.editor-field input,
.editor-field textarea {
    width: 100%;
    padding: 0.25rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 1.125rem;
    letter-spacing: -0.02em;
    box-shadow: none;
}

.editor-field input:focus,
.editor-field textarea:focus {
    outline: none;
    border: 0;
    box-shadow: none;
}

.editor-field textarea {
    min-height: 72px;
    resize: vertical;
    line-height: 1.45;
}

.editor-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: #fafafa;
}

.editor-status-kicker {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: -0.01em;
}

.editor-status strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    color: var(--text);
}

.editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.field-block {
    display: grid;
    gap: 0.5rem;
}

.field-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.5rem;
}

.form-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.suggest-wrap { position: relative; }

.suggest-box {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    padding: 0.35rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
    max-height: 240px;
    overflow-y: auto;
}

.suggest-item {
    display: block;
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.95rem;
    color: var(--text);
    cursor: pointer;
}

.suggest-item:hover,
.suggest-item.is-active {
    background: rgba(0, 0, 0, 0.05);
}

.suggest-empty {
    padding: 0.75rem 0.85rem;
    color: var(--muted);
    font-size: 0.85rem;
}

/* ——— Settings ——— */
.settings-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.35rem;
    animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    animation: rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}

.settings-card {
    padding: 1.5rem;
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.settings-card-wide { grid-column: 1 / -1; }

.settings-card h2 {
    margin: 0 0 0.4rem;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.settings-card > p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.inline-add {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.inline-add input { flex: 1; }

.registrar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
}

.registrar-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--bg-white);
}

.registrar-list li:last-child { border-bottom: none; }

.registrar-list span {
    font-weight: 500;
    letter-spacing: -0.01em;
}

.empty-sm { padding: 1.75rem 1rem; }

.info-list {
    margin: 0 0 1.25rem;
    display: grid;
    gap: 0.85rem;
}

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}

.info-list dt {
    margin: 0;
    color: var(--muted);
    font-size: 0.875rem;
}

.info-list dd {
    margin: 0;
    font-weight: 500;
}

/* ——— Modal ——— */
.modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 40;
}

.modal.open {
    display: grid;
    animation: fade 0.2s ease;
}

.modal-card {
    width: min(500px, 100%);
    max-height: min(90vh, 760px);
    overflow: auto;
    padding: 1.75rem;
    background: var(--bg-white);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
    animation: rise 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card-wide {
    width: min(560px, 100%);
}

.message-modal-card {
    width: min(640px, 100%);
    max-height: min(92vh, 820px);
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.message-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem 1rem;
    border-bottom: 1px solid var(--line);
}

.message-modal-head h2 {
    margin: 0 0 0.25rem;
}

.message-modal-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.message-letter {
    flex: 1 1 auto;
    padding: 1.25rem 1.5rem;
    background:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 193, 7, 0.08), transparent 55%),
        #f7f7f9;
    overflow: auto;
}

.message-textarea {
    display: block;
    width: 100%;
    min-height: 340px;
    height: min(52vh, 420px);
    margin: 0;
    padding: 1.35rem 1.4rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 1rem;
    line-height: 1.65;
    letter-spacing: -0.01em;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    resize: vertical;
}

.message-textarea:focus {
    outline: none;
    border-color: rgba(0, 113, 227, 0.45);
    box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.12), 0 10px 30px rgba(0, 0, 0, 0.06);
}

.message-modal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid var(--line);
    background: #fff;
}

.modal-card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.modal-card > p {
    margin: 0 0 1.35rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 1.35rem;
}

.file-drop {
    border: 1px dashed rgba(0, 113, 227, 0.35);
    border-radius: 16px;
    padding: 1.5rem 1.25rem;
    background: var(--blue-soft);
    text-align: center;
    color: var(--muted);
    display: grid;
    gap: 0.35rem;
    transition: border-color 0.2s, background 0.2s;
}

.file-drop strong {
    color: var(--text);
    font-weight: 600;
}

.file-drop.is-drag {
    border-color: var(--blue);
    background: rgba(0, 113, 227, 0.14);
}

.file-drop input {
    margin-top: 0.65rem;
    padding: 0.35rem;
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 0.875rem;
}

.file-name {
    color: var(--blue);
    font-size: 0.8125rem;
    font-weight: 500;
    min-height: 1.2em;
}

.export-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.export-card {
    display: grid;
    gap: 0.25rem;
    padding: 1.15rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--bg-soft);
    transition: border-color 0.15s, background 0.15s;
}

.export-card:hover {
    border-color: rgba(0, 113, 227, 0.35);
    background: var(--blue-soft);
}

.export-card strong {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.export-card span {
    color: var(--muted);
    font-size: 0.8125rem;
}

.toast {
    margin-bottom: 1.25rem;
    padding: 0.9rem 1.05rem;
    border-radius: 14px;
    border: 1px solid var(--line);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    animation: rise 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    transition: opacity 0.25s, transform 0.25s;
}

.toast.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.toast-success {
    background: rgba(52, 199, 89, 0.1);
    color: #248a3d;
    border-color: rgba(52, 199, 89, 0.2);
}

.toast-error {
    background: rgba(255, 59, 48, 0.08);
    color: #d70015;
    border-color: rgba(255, 59, 48, 0.18);
}

.toast-info {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: rgba(0, 113, 227, 0.18);
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8em;
    background: rgba(0, 0, 0, 0.05);
    padding: 0.15em 0.4em;
    border-radius: 6px;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 900px) {
    .stats,
    .settings-stats { grid-template-columns: repeat(2, 1fr); }
    .settings-grid { grid-template-columns: 1fr; }
    .settings-card-wide { grid-column: auto; }
}

@media (max-width: 720px) {
    .shell {
        width: min(1080px, calc(100% - 1.5rem));
        padding-top: 1.25rem;
    }

    .page-head { flex-direction: column; align-items: start; }
    .page-head h1 { font-size: 2.25rem; }
    .form-row,
    .field-grid { grid-template-columns: 1fr; }
    .export-options { grid-template-columns: 1fr; }
    .editor-actions { flex-direction: column-reverse; }
    .editor-actions .btn { width: 100%; }
    .editor-hero { text-align: left; }

    .message-modal-head,
    .message-modal-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .message-modal-foot .btn { width: 100%; }
    .message-textarea {
        min-height: 280px;
        height: auto;
    }

    .row-actions .btn-sm {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
    }

    th:nth-child(4),
    td:nth-child(4),
    th:nth-child(6),
    td:nth-child(6) {
        display: none;
    }

    .toolbar-right { width: 100%; justify-content: space-between; }
    .filter-chips { width: 100%; }
}
