/* ==========================================================================
   Axowl Design System — ah-components.css
   Global component styles with CSS variable support for dark mode.
   Import this in app.css AFTER the existing styles.
   ========================================================================== */

/* ── 1. Design Tokens ─────────────────────────────────────────────────── */
:root {
    /* Surfaces */
    --ah-bg:              #ffffff;
    --ah-bg-subtle:       #f8fafc;
    --ah-bg-surface:      #f1f5f9;
    --ah-bg-overlay:      rgba(0, 0, 0, 0.45);

    /* Borders */
    --ah-border:          #e2e8f0;
    --ah-border-soft:     #f1f5f9;

    /* Text */
    --ah-text:            #0f172a;
    --ah-text-sub:        #475569;
    --ah-text-muted:      #94a3b8;
    --ah-text-placeholder:#cbd5e1;

    /* Accent (primary action) */
    --ah-accent:          #0f172a;
    --ah-accent-text:     #ffffff;
    --ah-link:            #6366f1;
    --ah-link-hover:      #4f46e5;

    /* Semantic */
    --ah-danger:          #dc2626;
    --ah-danger-bg:       #fef2f2;
    --ah-danger-border:   #fecaca;
    --ah-success:         #16a34a;
    --ah-success-bg:      #f0fdf4;
    --ah-success-border:  #bbf7d0;
    --ah-warning:         #d97706;
    --ah-warning-bg:      #fffbeb;
    --ah-warning-border:  #fde68a;
    --ah-info:            #2563eb;
    --ah-info-bg:         #eff6ff;
    --ah-info-border:     #bfdbfe;

    /* Shadows */
    --ah-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.05);
    --ah-shadow-md:       0 4px 12px rgba(0, 0, 0, 0.10);
    --ah-shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.15);

    /* Focus ring */
    --ah-focus-ring:      0 0 0 2px rgba(129, 140, 248, 0.25);
    --ah-focus-color:     #6366f1;

    /* Radius */
    --ah-radius-sm:       4px;
    --ah-radius:          6px;
    --ah-radius-md:       8px;
    --ah-radius-lg:       12px;
    --ah-radius-xl:       14px;
}

[data-theme="dark"] {
    /* Surfaces — Aspire exact palette */
    --ah-bg:              #272727;       /* 콘텐츠 배경 (Aspire body) */
    --ah-bg-subtle:       #2f2f2f;       /* 서브 배경 */
    --ah-bg-surface:      #383838;       /* elevated surface */
    --ah-bg-overlay:      rgba(0, 0, 0, 0.65);

    /* Borders */
    --ah-border:          #3d3d3d;       /* Aspire table border */
    --ah-border-soft:     #333333;

    /* Text — bright for readability */
    --ah-text:            #ffffff;       /* primary */
    --ah-text-sub:        #e0e0e0;       /* 보조 텍스트 ↑↑ */
    --ah-text-muted:      #c0c0c0;       /* muted ↑↑ */
    --ah-text-placeholder:#909090;

    /* Accent */
    --ah-accent:          #ffffff;
    --ah-accent-text:     #272727;
    --ah-link:            #eac4ff;
    --ah-link-hover:      #d4a8f0;

    /* Status colors */
    --ah-danger-bg:       #2d1111;
    --ah-danger-border:   #7f1d1d;
    --ah-success-bg:      #052e16;
    --ah-success-border:  #14532d;
    --ah-warning-bg:      #2d1b00;
    --ah-warning-border:  #78350f;
    --ah-info-bg:         #0c1a3a;
    --ah-info-border:     #1e3a6e;

    /* Shadows */
    --ah-shadow-sm:       0 1px 3px rgba(0, 0, 0, 0.3);
    --ah-shadow-md:       0 4px 12px rgba(0, 0, 0, 0.4);
    --ah-shadow-lg:       0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ── 2. Layout ────────────────────────────────────────────────────────── */
.light-dashboard {
    width: 100%;
}

/* ── 3. Card ──────────────────────────────────────────────────────────── */
.card-panel {
    background:    var(--ah-bg);
    border:        1px solid var(--ah-border-soft);
    border-radius: var(--ah-radius-lg);
    box-shadow:    var(--ah-shadow-sm);
    padding:       1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size:      0.85rem;
    font-weight:    800;
    color:          var(--ah-text);
    letter-spacing: -0.2px;
    margin-bottom:  0.2rem;
    display:        flex;
    align-items:    center;
    gap:            0.5rem;
}

.card-desc {
    font-size:     0.8rem;
    color:         var(--ah-text-muted);
    margin-bottom: 1.25rem;
    line-height:   1.5;
}

.card-desc code {
    font-family:   'JetBrains Mono', monospace;
    font-size:     0.78rem;
    background:    var(--ah-bg-surface);
    padding:       0.1rem 0.3rem;
    border-radius: var(--ah-radius-sm);
    color:         var(--ah-text);
}

/* ── 4. Tabs ──────────────────────────────────────────────────────────── */
.settings-tabs {
    display:       flex;
    gap:           0;
    border-bottom: 1px solid var(--ah-border);
    margin-bottom: 1.5rem;
    overflow-x:    auto;
    scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar { display: none; }

.settings-tab {
    padding:        0.75rem 1.25rem;
    font-size:      0.8rem;
    font-weight:    600;
    color:          var(--ah-text-muted);
    cursor:         pointer;
    border-bottom:  2px solid transparent;
    transition:     color 0.15s, border-color 0.15s;
    white-space:    nowrap;
    user-select:    none;
}

.settings-tab:hover  { color: var(--ah-text-sub); }

.settings-tab.active {
    color:             var(--ah-text);
    font-weight:       700;
    border-bottom-color: var(--ah-text);
}

.tab-count {
    font-size:     0.6rem;
    font-weight:   700;
    background:    var(--ah-bg-surface);
    color:         var(--ah-text-muted);
    padding:       0.1rem 0.35rem;
    border-radius: 10px;
    border:        1px solid var(--ah-border);
    margin-left:   0.3rem;
}

/* ── 5. Form Fields ───────────────────────────────────────────────────── */
.field-group { margin-bottom: 1.25rem; }

.field-label {
    font-size:      0.7rem;
    font-weight:    700;
    color:          var(--ah-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom:  0.35rem;
    display:        block;
}

.field-input {
    width:         100%;
    font-size:     0.85rem;
    padding:       0.6rem 0.85rem;
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    outline:       none;
    color:         var(--ah-text);
    background:    var(--ah-bg);
    transition:    border-color 0.15s, box-shadow 0.15s;
    box-sizing:    border-box;
}

.field-input:focus {
    border-color: var(--ah-focus-color);
    box-shadow:   var(--ah-focus-ring);
}

.field-input::placeholder { color: var(--ah-text-placeholder); }

.field-input:disabled {
    background: var(--ah-bg-subtle);
    color:      var(--ah-text-muted);
    cursor:     not-allowed;
}

.field-textarea {
    width:         100%;
    font-size:     0.85rem;
    padding:       0.6rem 0.85rem;
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    outline:       none;
    color:         var(--ah-text);
    background:    var(--ah-bg);
    resize:        vertical;
    line-height:   1.6;
    transition:    border-color 0.15s, box-shadow 0.15s;
    box-sizing:    border-box;
}

.field-textarea:focus {
    border-color: var(--ah-focus-color);
    box-shadow:   var(--ah-focus-ring);
}

.field-textarea::placeholder { color: var(--ah-text-placeholder); }

.field-select {
    width:          100%;
    font-size:      0.85rem;
    padding:        0.6rem 0.85rem;
    border:         1px solid var(--ah-border);
    border-radius:  var(--ah-radius);
    outline:        none;
    color:          var(--ah-text);
    background:     var(--ah-bg);
    box-sizing:     border-box;
    -webkit-appearance: none;
    appearance:     none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat:   no-repeat;
    background-position: right 0.85rem center;
    padding-right:  2.2rem;
    transition:     border-color 0.15s, box-shadow 0.15s;
}

.field-select:focus {
    border-color: var(--ah-focus-color);
    box-shadow:   var(--ah-focus-ring);
}

.field-hint {
    font-size:   0.65rem;
    color:       var(--ah-text-muted);
    margin-top:  0.25rem;
    line-height: 1.5;
}

.field-hint a    { color: var(--ah-info); }
.field-hint code {
    font-family:   'JetBrains Mono', monospace;
    font-size:     0.65rem;
    background:    var(--ah-bg-surface);
    padding:       0.1rem 0.3rem;
    border-radius: var(--ah-radius-sm);
    color:         var(--ah-text-sub);
}

.two-col {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   1rem;
}

@media (max-width: 640px) {
    .two-col { grid-template-columns: 1fr; }
}

/* ── 6. Buttons ───────────────────────────────────────────────────────── */

/* Primary */
.btn-primary {
    font-size:     0.8rem;
    font-weight:   700;
    color:         var(--ah-accent-text);
    background:    var(--ah-accent);
    border:        1px solid var(--ah-accent);
    padding:       0.5rem 1.5rem;
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    opacity 0.15s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-primary:hover    { opacity: 0.85; }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Secondary */
.btn-secondary {
    font-size:     0.75rem;
    font-weight:   600;
    color:         var(--ah-text-sub);
    background:    var(--ah-bg);
    border:        1px solid var(--ah-border);
    padding:       0.4rem 1rem;
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    all 0.15s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-secondary:hover    { background: var(--ah-bg-subtle); border-color: var(--ah-text-muted); }
.btn-secondary:disabled { opacity: 0.4; cursor: not-allowed; }

/* Danger */
.btn-danger {
    font-size:     0.75rem;
    font-weight:   700;
    color:         #ffffff;
    background:    var(--ah-danger);
    border:        1px solid var(--ah-danger);
    padding:       0.4rem 1rem;
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    opacity 0.15s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-danger:hover    { opacity: 0.85; }
.btn-danger:disabled { opacity: 0.4; cursor: not-allowed; }

/* Danger outline */
.btn-danger-outline {
    font-size:     0.75rem;
    font-weight:   600;
    color:         var(--ah-danger);
    background:    var(--ah-bg);
    border:        1px solid var(--ah-danger-border);
    padding:       0.4rem 1rem;
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    all 0.15s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-danger-outline:hover    { background: var(--ah-danger-bg); }
.btn-danger-outline:disabled { opacity: 0.4; cursor: not-allowed; }

/* Revoke */
.btn-revoke {
    font-size:     0.68rem;
    font-weight:   600;
    color:         var(--ah-danger);
    background:    none;
    border:        1px solid var(--ah-danger-border);
    padding:       0.25rem 0.6rem;
    border-radius: var(--ah-radius-sm);
    cursor:        pointer;
    transition:    all 0.12s;
}
.btn-revoke:hover    { background: var(--ah-danger-bg); }
.btn-revoke:disabled { opacity: 0.4; cursor: not-allowed; }

/* Delete */
.btn-delete {
    font-size:     0.68rem;
    font-weight:   600;
    color:         var(--ah-danger);
    background:    var(--ah-danger-bg);
    border:        1px solid var(--ah-danger-border);
    padding:       0.25rem 0.6rem;
    border-radius: var(--ah-radius-sm);
    cursor:        pointer;
    transition:    all 0.12s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.25rem;
}
.btn-delete:hover { background: #fee2e2; }

/* Copy inline */
.btn-copy-inline {
    background: none;
    border:     none;
    color:      var(--ah-text-muted);
    cursor:     pointer;
    font-size:  0.75rem;
    padding:    0.2rem;
    transition: color 0.12s;
    flex-shrink: 0;
}
.btn-copy-inline:hover { color: var(--ah-text); }

/* Spinner */
.btn-spinner {
    display:       inline-block;
    width:         12px;
    height:        12px;
    border:        2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation:     ah-spin 0.6s linear infinite;
    flex-shrink:   0;
}

.btn-secondary .btn-spinner,
.btn-revoke    .btn-spinner {
    border-color:      rgba(71, 85, 105, 0.3);
    border-top-color:  var(--ah-text-sub);
}

@keyframes ah-spin { to { transform: rotate(360deg); } }

/* ── 7. Back link ─────────────────────────────────────────────────────── */
.back-link {
    font-size:   0.75rem;
    font-weight: 600;
    color:       var(--ah-text-muted);
    cursor:      pointer;
    text-decoration: none;
    transition:  color 0.15s;
    display:     inline-flex;
    align-items: center;
    gap:         0.3rem;
}
.back-link:hover { color: var(--ah-text-sub); }

/* ── 8. Actions bar ───────────────────────────────────────────────────── */
.actions-bar {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding-top:     1rem;
    border-top:      1px solid var(--ah-border-soft);
    margin-top:      0.5rem;
}

/* ── 9. Notice bar ────────────────────────────────────────────────────── */
.notice-bar {
    display:       flex;
    align-items:   flex-start;
    gap:           0.6rem;
    padding:       0.7rem 0.9rem;
    border-radius: var(--ah-radius-md);
    border:        1px solid var(--ah-border);
    font-size:     0.75rem;
    color:         var(--ah-text-sub);
    line-height:   1.55;
    margin-bottom: 1rem;
}

.notice-bar a { color: var(--ah-info); font-weight: 600; }

/* ── 10. Security notice ──────────────────────────────────────────────── */
.security-notice {
    background:    var(--ah-bg-subtle);
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius-md);
    padding:       0.85rem 1.25rem;
    font-size:     0.75rem;
    color:         var(--ah-text-sub);
    margin-bottom: 1.5rem;
    display:       flex;
    align-items:   flex-start;
    gap:           0.5rem;
    line-height:   1.5;
}

/* ── 11. One-time banner ──────────────────────────────────────────────── */
.one-time-banner {
    background:    var(--ah-warning-bg);
    border:        1px solid var(--ah-warning-border);
    border-radius: var(--ah-radius-md);
    padding:       1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.one-time-banner-title {
    font-size:     0.78rem;
    font-weight:   700;
    color:         #92400e;
    margin-bottom: 0.5rem;
}

.one-time-banner-key {
    font-family:   'JetBrains Mono', monospace;
    font-size:     0.82rem;
    color:         var(--ah-text);
    background:    var(--ah-bg);
    border:        1px solid var(--ah-warning-border);
    border-radius: var(--ah-radius);
    padding:       0.6rem 0.85rem;
    word-break:    break-all;
}

/* ── 12. Danger zone ──────────────────────────────────────────────────── */
.danger-zone { border-color: var(--ah-danger-border) !important; }

.danger-row {
    display:         flex;
    justify-content: space-between;
    align-items:     center;
    padding:         1rem 0;
    border-bottom:   1px solid var(--ah-danger-bg);
}

.danger-row:last-child { border-bottom: none; }

.danger-action {
    font-size:   0.8rem;
    font-weight: 700;
    color:       #991b1b;
}

.danger-desc {
    font-size:  0.7rem;
    color:      var(--ah-text-muted);
    margin-top: 0.1rem;
}

/* ── 13. Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
    position:        fixed;
    inset:           0;
    background:      var(--ah-bg-overlay);
    backdrop-filter: blur(4px);
    z-index:         1000;
    display:         flex;
    align-items:     center;
    justify-content: center;
}

.modal-panel {
    background:    var(--ah-bg);
    border-radius: var(--ah-radius-xl);
    box-shadow:    var(--ah-shadow-lg);
    padding:       2rem;
    max-width:     480px;
    width:         92%;
    max-height:    90vh;
    overflow-y:    auto;
}

.modal-title {
    font-weight:   800;
    font-size:     1.1rem;
    color:         var(--ah-text);
    margin-bottom: 0.3rem;
}

.modal-subtitle {
    font-size:     0.8rem;
    color:         var(--ah-text-muted);
    margin-bottom: 1.5rem;
    line-height:   1.4;
}

.confirm-desc {
    font-size:     0.85rem;
    color:         var(--ah-text-sub);
    line-height:   1.5;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display:         flex;
    justify-content: flex-end;
    gap:             0.5rem;
    margin-top:      1.5rem;
    padding-top:     1.25rem;
    border-top:      1px solid var(--ah-border-soft);
}

.btn-modal-cancel {
    padding:       0.45rem 1rem;
    font-size:     0.8rem;
    font-weight:   600;
    border:        1px solid var(--ah-border);
    background:    var(--ah-bg);
    color:         var(--ah-text-sub);
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    background 0.12s;
}
.btn-modal-cancel:hover { background: var(--ah-bg-subtle); }

.btn-modal-confirm {
    padding:       0.45rem 1.1rem;
    font-size:     0.8rem;
    font-weight:   700;
    border:        1px solid var(--ah-accent);
    background:    var(--ah-accent);
    color:         var(--ah-accent-text);
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    opacity 0.12s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-modal-confirm:hover    { opacity: 0.85; }
.btn-modal-confirm:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-modal-delete {
    padding:       0.45rem 1.1rem;
    font-size:     0.8rem;
    font-weight:   700;
    border:        1px solid var(--ah-danger);
    background:    var(--ah-danger);
    color:         #ffffff;
    border-radius: var(--ah-radius);
    cursor:        pointer;
    transition:    opacity 0.12s;
    display:       inline-flex;
    align-items:   center;
    gap:           0.3rem;
}
.btn-modal-delete:hover    { opacity: 0.85; }
.btn-modal-delete:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── 14. Slug input ───────────────────────────────────────────────────── */
.slug-input-wrapper {
    display:     flex;
    align-items: center;
    border:      1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    overflow:    hidden;
}

.slug-prefix {
    font-family:  'JetBrains Mono', monospace;
    font-size:    0.8rem;
    color:        var(--ah-text-muted);
    background:   var(--ah-bg-subtle);
    padding:      0.6rem 0.75rem;
    border-right: 1px solid var(--ah-border);
    white-space:  nowrap;
}

.slug-input {
    border:        none !important;
    border-radius: 0 !important;
    font-family:   'JetBrains Mono', monospace;
}
.slug-input:focus { box-shadow: none !important; }

/* ── 15. Key table ────────────────────────────────────────────────────── */
.key-table {
    width:           100%;
    border-collapse: separate;
    border-spacing:  0;
}

.key-table th {
    font-size:      0.65rem;
    font-weight:    700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color:          var(--ah-text-muted);
    border-bottom:  1px solid var(--ah-border-soft);
    padding:        0.6rem 0.75rem;
    text-align:     left;
}

.key-table td {
    padding:       0.75rem 0.75rem;
    border-bottom: 1px solid var(--ah-bg-subtle);
    font-size:     0.8rem;
    color:         var(--ah-text-sub);
    vertical-align: middle;
}

.key-table tbody tr:last-child td { border-bottom: none; }

.key-name {
    font-weight: 700;
    color:       var(--ah-text);
    font-size:   0.8rem;
}

.key-prefix {
    font-family:   'JetBrains Mono', monospace;
    font-size:     0.72rem;
    color:         var(--ah-text-muted);
    background:    var(--ah-bg-subtle);
    padding:       0.15rem 0.4rem;
    border-radius: var(--ah-radius-sm);
    border:        1px solid var(--ah-border-soft);
}

.key-date { font-size: 0.72rem; color: var(--ah-text-muted); }
.key-date.expiring { color: var(--ah-danger); font-weight: 600; }

/* ── 16. Signing key info ─────────────────────────────────────────────── */
.signing-key-info {
    background:    var(--ah-bg-subtle);
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius-md);
    padding:       1rem 1.25rem;
}

.signing-key-row {
    display:         flex;
    justify-content: space-between;
    padding:         0.4rem 0;
    border-bottom:   1px solid var(--ah-border-soft);
}
.signing-key-row:last-child { border-bottom: none; }

.signing-key-label {
    font-size:   0.7rem;
    font-weight: 700;
    color:       var(--ah-text-muted);
}

.signing-key-value {
    font-size:   0.75rem;
    font-weight: 600;
    color:       var(--ah-text);
}

/* ── 17. Secret display ───────────────────────────────────────────────── */
.secret-display {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    background:      var(--ah-bg-subtle);
    border:          1px solid var(--ah-border);
    border-radius:   var(--ah-radius-md);
    padding:         0.75rem 1rem;
    font-size:       0.8rem;
    color:           var(--ah-text);
}

/* ── 18. Plugin tokens ────────────────────────────────────────────────── */
.plugin-icon {
    font-size:     0.75rem;
    font-weight:   800;
    color:         var(--ah-text-sub);
    background:    var(--ah-bg-surface);
    width:         24px;
    height:        24px;
    border-radius: var(--ah-radius-sm);
    display:       flex;
    align-items:   center;
    justify-content: center;
}

.plugin-status {
    font-size:     0.65rem;
    font-weight:   700;
    padding:       0.15rem 0.4rem;
    border-radius: var(--ah-radius-sm);
}

.plugin-status.active {
    color:      var(--ah-success);
    background: var(--ah-success-bg);
    border:     1px solid var(--ah-success-border);
}

.plugin-status.inactive {
    color:      var(--ah-text-muted);
    background: var(--ah-bg-subtle);
    border:     1px solid var(--ah-border);
}

/* ── 19. URL / DNS preview ────────────────────────────────────────────── */
.dns-verify-box {
    background:    var(--ah-bg-subtle);
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius-md);
    padding:       1rem 1.25rem;
    margin-top:    1rem;
}

.dns-verify-title {
    font-size:      0.7rem;
    font-weight:    700;
    color:          var(--ah-text-sub);
    text-transform: uppercase;
    margin-bottom:  0.35rem;
}

.dns-verify-desc {
    font-size:     0.72rem;
    color:         var(--ah-text-muted);
    margin-bottom: 0.75rem;
}

.dns-record-row   { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
.dns-record-cell  { display: flex; flex-direction: column; gap: 0.15rem; }

.dns-label {
    font-size:      0.6rem;
    font-weight:    700;
    color:          var(--ah-text-muted);
    text-transform: uppercase;
}

.dns-value {
    font-size:   0.78rem;
    font-weight: 600;
    color:       var(--ah-text);
}

.dns-status {
    font-size:     0.68rem;
    font-weight:   700;
    padding:       0.2rem 0.5rem;
    border-radius: var(--ah-radius-sm);
}
.dns-status.verified {
    color:      #166534;
    background: var(--ah-success-bg);
    border:     1px solid var(--ah-success-border);
}
.dns-status.pending {
    color:      #92400e;
    background: var(--ah-warning-bg);
    border:     1px solid var(--ah-warning-border);
}

.url-preview-box {
    background:    var(--ah-bg-subtle);
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius-md);
    padding:       0.75rem 1rem;
}

.url-preview-label {
    font-size:      0.6rem;
    font-weight:    700;
    color:          var(--ah-text-muted);
    text-transform: uppercase;
    margin-bottom:  0.25rem;
}

.url-preview-value {
    display:         flex;
    align-items:     center;
    justify-content: space-between;
    font-size:       0.8rem;
    font-weight:     600;
    color:           var(--ah-text);
}

/* ── 20. Rotation timeline ────────────────────────────────────────────── */
.rotation-timeline { display: flex; flex-direction: column; gap: 0; }

.rotation-event {
    display:       flex;
    align-items:   flex-start;
    gap:           0.75rem;
    padding:       0.6rem 0;
    border-bottom: 1px solid var(--ah-bg-subtle);
}
.rotation-event:last-child { border-bottom: none; }

.rotation-dot {
    width:         8px;
    height:        8px;
    border-radius: 50%;
    background:    var(--ah-border);
    margin-top:    0.3rem;
    flex-shrink:   0;
}
.rotation-dot.create { background: #22c55e; }
.rotation-dot.rotate { background: #f59e0b; }
.rotation-dot.revoke { background: #ef4444; }

.rotation-action { font-size: 0.78rem; font-weight: 600; color: var(--ah-text); }
.rotation-meta   { font-size: 0.68rem; color: var(--ah-text-muted); }

/* ── 21. Tier / Device selector ───────────────────────────────────────── */
.tier-selector   { display: flex; flex-direction: column; gap: 0.5rem; }
.device-selector { display: flex; flex-direction: column; gap: 0.5rem; }

.tier-option,
.device-option {
    border:        1px solid var(--ah-border);
    border-radius: var(--ah-radius-md);
    padding:       1rem 1.25rem;
    cursor:        pointer;
    transition:    all 0.15s;
}
.tier-option:hover,
.device-option:hover { border-color: var(--ah-text-muted); background: var(--ah-bg-subtle); }

.tier-option.selected,
.device-option.selected { border-color: var(--ah-text); background: var(--ah-bg-subtle); }

.tier-option.disabled { opacity: 0.4; cursor: not-allowed; }

.tier-option-header {
    display:     flex;
    align-items: center;
    gap:         0.5rem;
    margin-bottom: 0.25rem;
}

.tier-option-level {
    font-family:   'JetBrains Mono', monospace;
    font-size:     0.7rem;
    font-weight:   800;
    color:         var(--ah-text);
    background:    var(--ah-bg-surface);
    padding:       0.15rem 0.5rem;
    border-radius: var(--ah-radius-sm);
}

.tier-option-name  { font-size: 0.8rem; font-weight: 700; color: var(--ah-text); }
.tier-option-desc  { font-size: 0.75rem; color: var(--ah-text-sub); }
.tier-option-tech  { font-size: 0.68rem; color: var(--ah-text-muted); margin-top: 0.15rem; }

.tier-locked-badge {
    font-size:     0.6rem;
    font-weight:   600;
    color:         var(--ah-danger);
    background:    var(--ah-danger-bg);
    padding:       0.1rem 0.4rem;
    border-radius: var(--ah-radius-sm);
    border:        1px solid var(--ah-danger-border);
    margin-left:   auto;
}

.device-option-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.device-option-name   { font-size: 0.8rem; font-weight: 700; color: var(--ah-text); }

/* ── 22. Toggle switch ────────────────────────────────────────────────── */
.toggle-switch {
    width:         40px;
    height:        22px;
    border-radius: 11px;
    cursor:        pointer;
    display:       flex;
    align-items:   center;
    padding:       2px;
    transition:    background 0.2s;
    flex-shrink:   0;
}
.toggle-switch.on  { background: #eac4ff; }
.toggle-switch.off { background: var(--ah-border); }

.toggle-knob {
    width:         18px;
    height:        18px;
    border-radius: 50%;
    background:    #ffffff;
    box-shadow:    0 1px 3px rgba(0, 0, 0, 0.2);
    transition:    transform 0.2s;
}
.toggle-switch.on  .toggle-knob { transform: translateX(18px); }
.toggle-switch.off .toggle-knob { transform: translateX(0); }

/* ── 23. Empty state ──────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--ah-text-muted); }
.empty-icon  { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.empty-text  { font-size: 0.85rem; font-weight: 600; }

/* ── 24. Utility ──────────────────────────────────────────────────────── */
.mono { font-family: 'JetBrains Mono', monospace; }
