/* ═══════════════════════════════════════════════════════════════
   Missivio Admin — Dashboard Theme (Dark / Light)
   Based on the Missivio site design charter
   ═══════════════════════════════════════════════════════════════ */

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ─── Design Tokens ─── */
:root {
    /* Core palette (from site) */
    --ink:       #08111F;
    --deep:      #0C1A2E;
    --navy:      #102440;
    --steel:     #1E3A5F;
    --mist:      #E8EFF8;
    --white:     #F5F8FC;
    --gold:      #B8943A;
    --gold-lt:   #D4AE5A;
    --azure:     #2563EB;
    --azure-lt:  #3B82F6;

    /* Semantic colors */
    --danger:    #E63946;
    --success:   #10B981;
    --warning:   #F59E0B;

    /* Semantic surfaces */
    --surface-0: var(--ink);       /* page background */
    --surface-1: var(--deep);      /* cards, sidebar */
    --surface-2: var(--navy);      /* inputs, table headers, hover */
    --surface-3: var(--steel);     /* elevated elements */

    /* Text */
    --text-primary:   var(--white);
    --text-secondary: rgba(232, 239, 248, 0.65);
    --text-muted:     rgba(232, 239, 248, 0.4);

    /* Borders */
    --border:       rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-focus: var(--azure);

    /* Fonts */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans:  'Outfit', system-ui, -apple-system, sans-serif;

    /* Radius */
    --radius-sm: 6px;
    --radius:    8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Transitions */
    --ease: 0.2s ease;
}

/* ─── Light Theme Override ─── */
[data-theme="light"] {
    --surface-0: #F4F6FA;
    --surface-1: #FFFFFF;
    --surface-2: #EDF0F7;
    --surface-3: #DDE3EF;

    --text-primary:   #1A2030;
    --text-secondary: #4B5568;
    --text-muted:     #8B95A8;

    --border:       rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);

    --azure:    #2563EB;
    --azure-lt: #3B82F6;
    --gold:     #9A7B2E;
    --gold-lt:  #B8943A;
}

/* Light: disable noise texture */
[data-theme="light"] body::before {
    opacity: 0;
}

/* Light: login page */
[data-theme="light"] .login-page {
    background: var(--surface-0);
}
[data-theme="light"] .login-page::after {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.06) 0%, transparent 70%);
}
[data-theme="light"] .login-card {
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .login-header h1 .wm-missiv {
    color: #1A2030;
}
[data-theme="light"] .login-admin-label {
    color: var(--text-muted);
}

/* Light: navbar */
[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(20px);
}
[data-theme="light"] .nav-brand-text {
    color: var(--text-primary);
}
[data-theme="light"] .nav-brand-label {
    background: rgba(154, 123, 46, 0.1);
}

/* Light: sidebar */
[data-theme="light"] .sidebar-menu a:hover {
    background: rgba(0, 0, 0, 0.04);
    border-left-color: rgba(0, 0, 0, 0.12);
}
[data-theme="light"] .sidebar-menu a.active {
    background: rgba(37, 99, 235, 0.06);
}

/* Light: content headings */
[data-theme="light"] .content h1 {
    color: var(--text-primary);
}

/* Light: card h2 */
[data-theme="light"] .card h2 {
    color: var(--text-primary);
}

/* Light: buttons */
[data-theme="light"] .btn-secondary {
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .btn-secondary:hover {
    border-color: rgba(0, 0, 0, 0.3);
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .btn-danger {
    background: rgba(230, 57, 70, 0.08);
    border-color: rgba(230, 57, 70, 0.2);
    color: #DC2626;
}
[data-theme="light"] .btn-danger:hover {
    background: #E63946;
    border-color: #E63946;
    color: #fff;
}

/* Light: form inputs */
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
    color: var(--text-primary);
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder {
    color: var(--text-muted);
}
[data-theme="light"] .form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='rgba(0,0,0,0.35)'/%3E%3C/svg%3E");
}

/* Light: alerts */
[data-theme="light"] .alert-error {
    background: rgba(230, 57, 70, 0.06);
    color: #B91C1C;
    border-color: rgba(230, 57, 70, 0.2);
}
[data-theme="light"] .alert-info {
    background: rgba(37, 99, 235, 0.05);
    color: #1D4ED8;
    border-color: rgba(37, 99, 235, 0.15);
}
[data-theme="light"] .alert-warning {
    background: rgba(245, 158, 11, 0.06);
    color: #92400E;
    border-color: rgba(245, 158, 11, 0.15);
}
[data-theme="light"] .alert-warning a {
    color: #92400E;
}
[data-theme="light"] .alert-warning a:hover {
    color: var(--text-primary);
}
[data-theme="light"] .alert-success {
    background: rgba(16, 185, 129, 0.06);
    color: #065F46;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Light: table */
[data-theme="light"] .table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Light: badges */
[data-theme="light"] .badge {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
}
[data-theme="light"] .badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065F46;
}
[data-theme="light"] .badge-error {
    background: rgba(230, 57, 70, 0.1);
    color: #B91C1C;
}
[data-theme="light"] .badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400E;
}

/* Light: DNS records */
[data-theme="light"] .dns-record-value {
    color: #1D4ED8;
}
[data-theme="light"] .table .cell-mono {
    color: #1D4ED8;
}
[data-theme="light"] pre {
    color: #1D4ED8;
}
[data-theme="light"] .instructions-list {
    background: rgba(37, 99, 235, 0.04);
}

/* Light: error page */
[data-theme="light"] .error-container h1 {
    color: var(--text-primary);
}

/* Light: links */
[data-theme="light"] a {
    color: var(--azure);
}
[data-theme="light"] a:hover {
    color: #1D4ED8;
}

/* ─── Theme Toggle Button ─── */
.theme-toggle {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ease);
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--azure);
    color: var(--azure-lt);
    background: rgba(37, 99, 235, 0.08);
}

/* Show/hide icons based on theme */
.theme-toggle .icon-moon {
    display: none;
}

/* Light mode: swap icons */
[data-theme="light"] .theme-toggle .icon-sun {
    display: none;
}
[data-theme="light"] .theme-toggle .icon-moon {
    display: block;
}

/* ─── Base ─── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--surface-0);
    -webkit-font-smoothing: antialiased;
}

/* Subtle noise texture like the site */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}

/* Ensure all content sits above noise */
body > * {
    position: relative;
    z-index: 1;
}

a {
    color: var(--azure-lt);
    text-decoration: none;
    transition: color var(--ease);
}
a:hover {
    color: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--ink);
}

/* Background orbs like the site hero */
.login-page::after {
    content: '';
    position: fixed;
    top: 20%;
    left: 50%;
    width: 600px;
    height: 600px;
    transform: translate(-50%, -30%);
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    z-index: 1;
}

.login-card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 1rem;
}

.login-header h1 {
    font-family: var(--serif);
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

.login-header h1 .wm-missiv {
    color: var(--white);
}

.login-header h1 .wm-io {
    color: var(--azure);
}

.login-admin-label {
    font-family: var(--sans);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 300;
}

.login-form {
    margin-top: 1.5rem;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════════ */

.navbar {
    background: rgba(12, 26, 46, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-logo {
    height: 28px;
    width: auto;
}

.nav-brand-wordmark {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.wm-missiv {
    color: var(--white);
}

.wm-io {
    color: var(--azure);
}

[data-theme="light"] .wm-missiv {
    color: #1A2030;
}

[data-theme="light"] .wm-io {
    color: var(--azure);
}

.nav-brand-mark {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--azure) 0%, var(--gold) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--serif);
    font-size: 0.85rem;
    color: #fff;
    font-weight: 600;
}

.nav-brand-text {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.02em;
}

.nav-brand-label {
    font-family: var(--sans);
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold);
    background: rgba(184, 148, 58, 0.12);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.nav-user .btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT — SIDEBAR + CONTENT
   ═══════════════════════════════════════════════════════════════ */

.container {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 220px;
    background: var(--surface-1);
    border-right: 1px solid var(--border);
    padding: 1.25rem 0;
    flex-shrink: 0;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 2px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 400;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all var(--ease);
}

.sidebar-menu a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
    border-left-color: rgba(255, 255, 255, 0.15);
}

.sidebar-menu a.active {
    color: var(--azure-lt);
    background: rgba(37, 99, 235, 0.08);
    border-left-color: var(--azure);
    font-weight: 500;
}

.content {
    flex: 1;
    padding: 2rem 2.5rem;
    min-width: 0;
}

.content h1 {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 1.75rem;
    letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */

.card {
    background: var(--surface-1);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color var(--ease);
}

.card:hover {
    border-color: var(--border-hover);
}

.card h2 {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.card p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.form-group small {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--sans);
    font-size: 0.875rem;
    color: var(--white);
    transition: all var(--ease);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--azure);
    background: rgba(37, 99, 235, 0.06);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='rgba(232,239,248,0.5)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

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

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.15rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.btn-primary {
    background: var(--azure);
    border-color: var(--azure);
    color: #fff;
}

.btn-primary:hover {
    background: var(--azure-lt);
    border-color: var(--azure-lt);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
    background: transparent;
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
    background: rgba(230, 57, 70, 0.15);
    border-color: rgba(230, 57, 70, 0.3);
    color: #f87171;
}

.btn-danger:hover {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.btn-sm {
    padding: 0.3rem 0.65rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */

.alert {
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(230, 57, 70, 0.1);
    color: #fca5a5;
    border-color: rgba(230, 57, 70, 0.25);
}

.alert-info {
    background: rgba(37, 99, 235, 0.08);
    color: var(--azure-lt);
    border-color: rgba(37, 99, 235, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.2);
}

.alert-warning a {
    color: var(--gold-lt);
    text-decoration: underline;
}
.alert-warning a:hover {
    color: var(--white);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.25);
}

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: var(--surface-2);
}

.table thead tr:first-child th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}
.table thead tr:first-child th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.table th {
    padding: 0.65rem 0.85rem;
    text-align: left;
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

.table td {
    padding: 0.65rem 0.85rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.table tbody tr {
    transition: background var(--ease);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
}

.badge-error {
    background: rgba(230, 57, 70, 0.12);
    color: #fca5a5;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
}

/* ═══════════════════════════════════════════════════════════════
   DNS RECORD BLOCKS (domain verify page)
   ═══════════════════════════════════════════════════════════════ */

.dns-record {
    background: var(--surface-2);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin: 1rem 0;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.85rem;
    border: 1px solid var(--border);
}

.dns-record strong {
    color: var(--text-secondary);
    font-weight: 500;
}

.dns-record-value {
    background: var(--surface-1);
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    word-break: break-all;
    margin-top: 0.5rem;
    color: var(--azure-lt);
}

.copy-btn {
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.instructions-list {
    background: rgba(37, 99, 235, 0.06);
    padding: 1.25rem;
    border-left: 3px solid var(--azure);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1rem 0;
}

.instructions-list p {
    color: var(--text-secondary);
}

.instructions-list ol {
    margin: 0.75rem 0;
    padding-left: 1.25rem;
}

.instructions-list li {
    margin: 0.5rem 0;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

pre {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.8rem;
    color: var(--azure-lt);
    overflow-x: auto;
}

/* ═══════════════════════════════════════════════════════════════
   ERROR PAGE
   ═══════════════════════════════════════════════════════════════ */

.error-container {
    max-width: 500px;
    margin: 100px auto;
    text-align: center;
    padding: 2.5rem;
}

.error-code {
    font-family: var(--serif);
    font-size: 5rem;
    font-weight: 300;
    background: linear-gradient(135deg, var(--danger) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.error-container h1 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.error-message {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.error-detail {
    background: var(--surface-1);
    border: 1px solid var(--border);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    text-align: left;
    font-family: 'SF Mono', monospace;
    font-size: 0.8rem;
    color: var(--text-secondary);
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   DNS / DKIM PAGE
   ═══════════════════════════════════════════════════════════════ */

.dns-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.25rem;
    margin-bottom: 1rem;
}

.dns-section-header h3 {
    font-family: var(--sans);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--white);
    margin: 0;
}

.dns-group {
    margin-top: 1.5rem;
}

.dns-group h4 {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
}

.dns-group p {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.table .cell-mono {
    word-break: break-all;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 0.78em;
    color: var(--azure-lt);
}

.table .cell-status {
    width: 40px;
}

.dkim-actions {
    margin-top: 1.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   MAILBOX CREATE FORM
   ═══════════════════════════════════════════════════════════════ */

.email-compose {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.email-compose input,
.email-compose select {
    flex: 1;
}

.email-compose .at-separator {
    color: var(--text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY
   ═══════════════════════════════════════════════════════════════ */

.mt-1 { margin-top: 0.75rem; }
.mt-2 { margin-top: 1.25rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.75rem; }
.d-inline { display: inline; }

.action-form {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 0.5rem;
}

.input-inline {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-primary);
    width: 150px;
}

/* Lead message cell — truncate long text */
.lead-message {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lead-message:hover {
    white-space: normal;
    overflow: visible;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.75rem 0;
    }

    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 0;
    }

    .sidebar-menu a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

    .sidebar-menu a.active {
        border-left-color: transparent;
        border-bottom-color: var(--azure);
    }

    .content {
        padding: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 0 1rem;
    }

    .nav-brand-label {
        display: none;
    }
}
