/* ==========================================================================
   Our Telekom DNS Platform — Design System
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */

:root {
    /* Background */
    --bg-primary: #081411;
    --bg-secondary: rgba(10, 28, 24, 0.84);
    --bg-tertiary: rgba(17, 41, 34, 0.82);
    --bg-card: rgba(8, 22, 19, 0.76);
    --bg-card-hover: rgba(14, 31, 27, 0.88);
    --bg-elevated: rgba(13, 27, 24, 0.94);
    --bg-input: rgba(7, 17, 15, 0.84);
    --bg-overlay: rgba(2, 8, 7, 0.72);
    --surface-glow-1: rgba(46, 197, 167, 0.16);
    --surface-glow-2: rgba(245, 158, 11, 0.12);

    /* Accent */
    --accent: #2ec5a7;
    --accent-hover: #1fb598;
    --accent-glow: rgba(46, 197, 167, 0.18);
    --accent-gradient: linear-gradient(135deg, #2ec5a7 0%, #f6ad55 120%);

    /* Semantic */
    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.10);
    --success-border: rgba(52, 211, 153, 0.25);
    --danger: #f87171;
    --danger-bg: rgba(248, 113, 113, 0.10);
    --danger-border: rgba(248, 113, 113, 0.25);
    --warning: #fbbf24;
    --warning-bg: rgba(251, 191, 36, 0.10);
    --warning-border: rgba(251, 191, 36, 0.25);
    --info: #818cf8;
    --info-bg: rgba(129, 140, 248, 0.10);
    --info-border: rgba(129, 140, 248, 0.25);

    /* Text */
    --text-primary: #f3f7fb;
    --text-secondary: #bdd0c8;
    --text-muted: #7b948c;
    --text-disabled: #4a625c;

    /* Borders */
    --border: rgba(148, 163, 184, 0.14);
    --border-hover: rgba(148, 163, 184, 0.26);
    --border-focus: #2ec5a7;

    /* Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 10px 24px rgba(1, 7, 18, 0.18);
    --shadow-md: 0 18px 42px rgba(1, 7, 18, 0.28);
    --shadow-lg: 0 24px 64px rgba(1, 7, 18, 0.38);
    --shadow-xl: 0 36px 80px rgba(1, 7, 18, 0.48);
    --shadow-glow: 0 0 24px rgba(46, 197, 167, 0.18);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --topbar-height: 60px;

    /* Transitions */
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 300ms;

    /* Fonts */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-mono: 'IBM Plex Mono', 'JetBrains Mono', 'Fira Code', monospace;
}

:root[data-theme="aurora"] {
    --accent: #2ec5a7;
    --accent-hover: #1fb598;
    --accent-glow: rgba(46, 197, 167, 0.18);
    --accent-gradient: linear-gradient(135deg, #2ec5a7 0%, #f6ad55 100%);
    --border-focus: #2ec5a7;
    --shadow-glow: 0 0 24px rgba(46, 197, 167, 0.18);
    --surface-glow-1: rgba(46, 197, 167, 0.16);
    --surface-glow-2: rgba(245, 158, 11, 0.12);
}

:root[data-theme="ocean"] {
    --bg-primary: #07111f;
    --bg-secondary: rgba(12, 24, 42, 0.84);
    --bg-tertiary: rgba(26, 42, 66, 0.82);
    --bg-card: rgba(12, 22, 39, 0.72);
    --bg-card-hover: rgba(18, 30, 52, 0.84);
    --bg-elevated: rgba(18, 29, 49, 0.92);
    --bg-input: rgba(7, 17, 31, 0.82);
    --bg-overlay: rgba(2, 8, 18, 0.72);
    --accent: #66a3ff;
    --accent-hover: #4e90f7;
    --accent-glow: rgba(102, 163, 255, 0.18);
    --accent-gradient: linear-gradient(135deg, #66a3ff 0%, #4ade80 120%);
    --text-secondary: #b3c0d5;
    --text-muted: #7f91ab;
    --text-disabled: #51637a;
    --border-focus: #66a3ff;
    --shadow-glow: 0 0 24px rgba(102, 163, 255, 0.18);
    --surface-glow-1: rgba(96, 165, 250, 0.16);
    --surface-glow-2: rgba(45, 212, 191, 0.14);
}

:root[data-theme="emerald"] {
    --accent: #2dd4bf;
    --accent-hover: #14b8a6;
    --accent-glow: rgba(45, 212, 191, 0.18);
    --accent-gradient: linear-gradient(135deg, #2dd4bf 0%, #22c55e 100%);
    --border-focus: #10b981;
    --shadow-glow: 0 0 24px rgba(45, 212, 191, 0.18);
    --surface-glow-1: rgba(45, 212, 191, 0.15);
    --surface-glow-2: rgba(34, 197, 94, 0.14);
}

:root[data-theme="ember"] {
    --accent: #fb923c;
    --accent-hover: #f97316;
    --accent-glow: rgba(251, 146, 60, 0.2);
    --accent-gradient: linear-gradient(135deg, #fb923c 0%, #f43f5e 100%);
    --border-focus: #f97316;
    --shadow-glow: 0 0 24px rgba(251, 146, 60, 0.18);
    --surface-glow-1: rgba(251, 146, 60, 0.16);
    --surface-glow-2: rgba(244, 63, 94, 0.12);
}

:root[data-theme="gold"] {
    --accent: #fbbf24;
    --accent-hover: #f59e0b;
    --accent-glow: rgba(251, 191, 36, 0.18);
    --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    --border-focus: #eab308;
    --shadow-glow: 0 0 24px rgba(251, 191, 36, 0.18);
    --surface-glow-1: rgba(251, 191, 36, 0.15);
    --surface-glow-2: rgba(249, 115, 22, 0.12);
}

:root[data-theme="slate"] {
    --accent: #c084fc;
    --accent-hover: #a855f7;
    --accent-glow: rgba(192, 132, 252, 0.18);
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    --border-focus: #c084fc;
    --shadow-glow: 0 0 24px rgba(192, 132, 252, 0.18);
    --surface-glow-1: rgba(129, 140, 248, 0.14);
    --surface-glow-2: rgba(192, 132, 252, 0.14);
}

/* --------------------------------------------------------------------------
   2. Reset & Base
   -------------------------------------------------------------------------- */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    overscroll-behavior: none;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at top left, var(--surface-glow-1), transparent 28%),
        radial-gradient(circle at 85% 12%, var(--surface-glow-2), transparent 22%),
        linear-gradient(180deg, #040c0a 0%, #081411 45%, #0d1715 100%);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.6;
    z-index: 0;
}

body::before {
    top: -90px;
    right: -40px;
    width: 280px;
    height: 280px;
    background: var(--surface-glow-1);
}

body::after {
    bottom: -120px;
    left: -70px;
    width: 320px;
    height: 320px;
    background: var(--surface-glow-2);
}

[hidden] {
    display: none !important;
}

a {
    color: #4f8efa;
    text-decoration: none;
    transition: color var(--duration-normal) ease;
}

a:hover {
    color: #6ba3f7;
}

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

img,
svg {
    display: block;
    max-width: 100%;
}

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

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #0c1222;
}

::-webkit-scrollbar-thumb {
    background: #2d3d56;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d4f6a;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #2d3d56 #0c1222;
}

/* Selection */
::selection {
    background: rgba(79, 142, 250, 0.30);
    color: #e8edf5;
}

/* Focus visible for all interactive elements */
:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

h1,
h2,
h3,
h4 {
    color: var(--text-primary);
    margin: 0;
    font-family: var(--font-display);
}

svg {
    shape-rendering: geometricPrecision;
}

/* --------------------------------------------------------------------------
   3. Typography Utilities
   -------------------------------------------------------------------------- */

.font-mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.text-primary {
    color: #e8edf5;
}

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

.text-muted {
    color: #6b7a94;
}

.text-accent {
    color: var(--accent);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-warning {
    color: var(--warning);
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    letter-spacing: -0.01em;
}

.inline-code {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    color: #e8edf5;
}

/* --------------------------------------------------------------------------
   4. App Layout
   -------------------------------------------------------------------------- */

.app-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
    transition: grid-template-columns var(--duration-slow) var(--ease-out);
}

.app-layout.sidebar-collapsed {
    grid-template-columns: 64px 1fr;
}

.main-panel {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    min-width: 0;
}

.main-content {
    flex: 1;
    padding: 28px 34px 36px;
    overflow-y: auto;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.main-content > * {
    animation: fadeInUp 300ms ease-out;
}



/* --------------------------------------------------------------------------
   5. Sidebar
   -------------------------------------------------------------------------- */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    background:
        linear-gradient(180deg, rgba(7, 17, 31, 0.92), rgba(8, 18, 32, 0.82)),
        radial-gradient(circle at top left, var(--surface-glow-1), transparent 40%);
    border-right: 1px solid var(--border);
    z-index: 100;
    transition: width var(--duration-slow) var(--ease-out);
    overflow: hidden;
    backdrop-filter: blur(20px) saturate(1.1);
}

.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px 16px;
    min-height: 64px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.sidebar-logo-mark {
    border: 2px solid #141c2e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: #e8edf5;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transition: opacity var(--duration-normal) ease;
}

.sidebar-collapsed .sidebar-logo-text {
    opacity: 0;
    pointer-events: none;
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--duration-normal) ease;
    border: 2px solid #141c2e;
}

.sidebar-collapse-btn:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

.sidebar-collapsed .sidebar-collapse-btn {
    display: none;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 4px 12px;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-section-label {
    padding: 20px 12px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity var(--duration-normal) ease;
}

.sidebar-collapsed .nav-section-label {
    opacity: 0;
    height: 20px;
    padding: 10px 0 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
    transition: all var(--duration-normal) ease;
    border-left: 3px solid transparent;
    margin-left: -3px;
}

.nav-link:hover {
    color: #e8edf5;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: #6ba3f7;
    background: rgba(79, 142, 250, 0.08);
    border-left-color: #4f8efa;
}

.nav-link.active .nav-icon {
    color: var(--accent);
}

.nav-icon {
    width: 20px;
    height: 20px;
    border: 2px solid #141c2e;
    color: var(--text-muted);
    transition: color var(--duration-normal) ease;
}

.nav-link:hover .nav-icon {
    color: var(--text-secondary);
}

.nav-label {
    transition: opacity var(--duration-normal) ease;
}

.sidebar-collapsed .nav-label {
    opacity: 0;
    pointer-events: none;
}

.sidebar-collapsed .nav-link {
    justify-content: center;
    padding: 10px;
    margin-left: 0;
    border-left: none;
}

.sidebar-collapsed .nav-link.active {
    border-left: none;
    border-bottom: 2px solid var(--accent);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    overflow: hidden;
}

.tenant-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    margin-bottom: 8px;
}

.tenant-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid #141c2e;
    animation: tenantPulse 2s ease-in-out infinite;
}

@keyframes tenantPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.40);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(52, 211, 153, 0);
    }
}

.tenant-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--duration-normal) ease;
}

.sidebar-collapsed .tenant-name {
    opacity: 0;
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: var(--radius-md);
    transition: background var(--duration-normal) ease;
    cursor: pointer;
}

.sidebar-user-card:hover {
    background: var(--bg-tertiary);
}

.sidebar-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    border: 2px solid #141c2e;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: opacity var(--duration-normal) ease;
}

.sidebar-collapsed .sidebar-user-info {
    opacity: 0;
    pointer-events: none;
}

.sidebar-user-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e8edf5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   6. Top Bar
   -------------------------------------------------------------------------- */

.topbar {
    height: 64px;
    background: rgba(5, 12, 23, 0.68);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px) saturate(1.1);
}

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

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--duration-normal) ease;
}

.sidebar-toggle:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6b7a94;
    font-size: 14px;
}

.breadcrumb-current {
    color: #e8edf5;
    font-weight: 500;
}

.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    color: var(--text-muted);
    opacity: 0.5;
}

.breadcrumb a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color var(--duration-normal) ease;
}

.breadcrumb a:hover {
    color: #e8edf5;
}

.breadcrumb li:last-child {
    color: #e8edf5;
    font-weight: 600;
}

/* Search */
.search-wrapper {
    position: relative;
    width: 240px;
    transition: width 200ms;
}

.search-wrapper:focus-within {
    width: 320px;
}

.search-input {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--duration-normal) ease;
}

.search-box-input {
    width: 220px;
    padding: 10px 42px 10px 38px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.8125rem;
    outline: none;
    transition: all var(--duration-normal) ease;
}

.search-box-input::placeholder {
    color: var(--text-muted);
}

.search-box-input:hover {
    border-color: var(--border-hover);
}

.search-box-input:focus {
    width: 300px;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow), var(--shadow-sm);
    background: rgba(255, 255, 255, 0.06);
}

.search-box-input:focus ~ .search-kbd {
    opacity: 0;
}

.search-kbd {
    position: absolute;
    right: 10px;
    padding: 2px 6px;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    transition: opacity var(--duration-normal) ease;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: background var(--duration-normal) ease, border-color var(--duration-normal) ease;
}

.user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
    border: 2px solid #141c2e;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #e8edf5;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    padding: 6px;
    background: rgba(9, 18, 32, 0.88);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 200ms var(--ease-out);
    z-index: 200;
    backdrop-filter: blur(16px) saturate(1.1);
}

.user-menu-header {
    padding: 10px 12px 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

.menu-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 4px 8px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) ease;
    text-align: left;
}

.menu-item:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

.menu-item-danger {
    color: var(--danger);
}

.menu-item-danger:hover {
    color: #fff;
    background: var(--danger);
}

/* --------------------------------------------------------------------------
   7. Page Header
   -------------------------------------------------------------------------- */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8edf5;
}

.page-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e8edf5;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.page-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --------------------------------------------------------------------------
   8. Cards
   -------------------------------------------------------------------------- */

.card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    transition: all var(--duration-normal) ease;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px) saturate(1.08);
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
}

.card-interactive {
    cursor: pointer;
}

.card-interactive:hover {
    border-color: rgba(79, 142, 250,0.30);
    box-shadow: 0 0 0 1px var(--accent-glow), var(--shadow-md);
    transform: translateY(-1px);
}

.card-interactive:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   9. Stats Grid
   -------------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: all var(--duration-normal) ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card.stat-blue::before {
    background: var(--accent-gradient);
}

.stat-card.stat-emerald::before {
    background: linear-gradient(90deg, #34d399, #34d399);
}

.stat-card.stat-amber::before {
    background: linear-gradient(90deg, #fbbf24, #fbbf24);
}

.stat-card.stat-purple::before {
    background: linear-gradient(90deg, #818cf8, #b49af5);
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-display);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 6px;
}

.stat-trend.up {
    color: var(--success);
}

.stat-trend.down {
    color: var(--danger);
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #141c2e;
}

.stat-icon.icon-blue {
    background: linear-gradient(135deg, #4f8efa, #6366f1);
}

.stat-icon.icon-emerald {
    background: linear-gradient(135deg, #34d399, #34d399);
}

.stat-icon.icon-amber {
    background: linear-gradient(135deg, #fbbf24, #fbbf24);
}

.stat-icon.icon-purple {
    background: linear-gradient(135deg, #818cf8, #6366f1);
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

/* --------------------------------------------------------------------------
   10. Data Tables
   -------------------------------------------------------------------------- */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-card);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(12, 18, 34, 0.90);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.data-table thead th {
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
    user-select: none;
}

.data-table thead th.sortable {
    cursor: pointer;
    transition: color var(--duration-normal) ease;
}

.data-table thead th.sortable:hover {
    color: var(--text-secondary);
}

.data-table thead th .sort-arrow {
    display: inline-block;
    margin-left: 4px;
    opacity: 0.3;
    transition: opacity var(--duration-normal) ease;
}

.data-table thead th.sorted .sort-arrow {
    opacity: 1;
    color: var(--accent);
}

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

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

.data-table tbody tr:nth-child(even) {
    background: rgba(20, 28, 46,0.30);
}

.data-table tbody tr:hover {
    background: rgba(79, 142, 250,0.04);
}

.data-table tbody tr.selected {
    background: rgba(79, 142, 250,0.08);
    border-left: 3px solid var(--accent);
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(30, 42, 62, 0.50);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table td.mono,
.data-table .mono {
    font-family: var(--font-mono);
    font-size: 13px;
}

.data-table td.clickable,
.data-table .clickable {
    cursor: pointer;
    color: var(--accent);
    font-weight: 500;
    transition: color var(--duration-normal) ease;
}

.data-table td.clickable:hover,
.data-table .clickable:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.data-table .row-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transition: opacity var(--duration-normal) ease;
}

.data-table tbody tr:hover .row-actions {
    opacity: 1;
}

.data-table .empty-row td {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   11. Record Type Badges
   -------------------------------------------------------------------------- */

.record-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    line-height: 1.4;
}

.record-badge-A {
    background: #1a2f52;
    color: #6ba3f7;
}

.record-badge-AAAA {
    background: #251445;
    color: #b49af5;
}

.record-badge-MX {
    background: #33200a;
    color: #f7a84b;
}

.record-badge-CNAME {
    background: #0a2928;
    color: #3dd9c0;
}

.record-badge-TXT {
    background: #1a2030;
    color: #9ba8c2;
}

.record-badge-SRV {
    background: #3a0a22;
    color: #f288b5;
}

.record-badge-NS {
    background: #0a2a14;
    color: #4fdb87;
}

.record-badge-CAA {
    background: #332508;
    color: #f7c948;
}

.record-badge-SOA {
    background: #1a1a20;
    color: #a8a29e;
}

.record-badge-PTR {
    background: #1a1a40;
    color: #818cf8;
}

/* --------------------------------------------------------------------------
   12. Status Badges
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-active {
    background: #0f2a1e;
    color: #4fdb87;
}

.badge-active::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4fdb87;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.badge-inactive {
    background: #1a2030;
    color: #6b7a94;
}

.badge-inactive::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7a94;
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid var(--warning-border);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
    border: 1px solid var(--info-border);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid var(--danger-border);
}

.badge-sm {
    padding: 2px 8px;
    font-size: 0.6875rem;
}

/* Zone type badges */
.zone-type-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.zone-type-primary {
    background: #1a2f52;
    color: #6ba3f7;
}

.zone-type-secondary {
    background: #251445;
    color: #b49af5;
}

.zone-type-master {
    background: rgba(79, 142, 250,0.12);
    color: #6ba3f7;
}

.zone-type-slave {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.zone-type-forward {
    background: rgba(129, 140, 248, 0.12);
    color: #b49af5;
}

.zone-type-native {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

/* --------------------------------------------------------------------------
   13. Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin: 0;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all var(--duration-normal) ease;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid #4f8efa;
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Primary */
.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #4f8efa, #4371d4);
    box-shadow: 0 2px 8px rgba(79, 142, 250, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a7be8, #3660c0);
    box-shadow: 0 4px 16px rgba(79, 142, 250, 0.35);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(79, 142, 250, 0.3);
}

/* Danger */
.btn-danger {
    color: #fff;
    background: #f87171;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.20);
}

.btn-danger:hover {
    background: #ef5350;
    box-shadow: 0 4px 16px rgba(248, 113, 113, 0.30);
    transform: translateY(-1px);
}

.btn-danger:active {
    transform: translateY(0);
}

/* Ghost */
.btn-ghost {
    color: #9ba8c2;
    background: transparent;
    border-color: transparent;
}

.btn-ghost:hover {
    color: #9ba8c2;
    background: rgba(79, 142, 250, 0.06);
    border-color: transparent;
}

.btn-ghost:active {
    background: rgba(79, 142, 250, 0.10);
}

/* Success */
.btn-success {
    color: #fff;
    background: var(--success);
    box-shadow: 0 2px 8px rgba(52, 211, 153, 0.20);
}

.btn-success:hover {
    background: #0ea572;
    transform: translateY(-1px);
}

.btn-success:active {
    transform: translateY(0);
}

/* Small */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* Icon button */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
}

.btn-icon:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
    border-color: var(--border);
}

.btn-icon.btn-icon-danger:hover {
    color: var(--danger);
    background: var(--danger-bg);
    border-color: var(--danger-border);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Loading state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
}

/* --------------------------------------------------------------------------
   14. Forms
   -------------------------------------------------------------------------- */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.helper-text {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: #0c1222;
    border: 1px solid #1e2a3e;
    border-radius: 8px;
    color: #e8edf5;
    font-size: 0.875rem;
    outline: none;
    transition: all var(--duration-normal) ease;
}

.form-input::placeholder {
    color: #4a5568;
}

.form-input:hover {
    border-color: #2d3d56;
}

.form-input:focus {
    border-color: #4f8efa;
    box-shadow: 0 0 0 3px rgba(79, 142, 250, 0.12);
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(248, 113, 113,0.12);
}

.form-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-input.mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
}

.form-error {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    color: var(--danger);
}

/* Textarea */
textarea.form-input {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

/* Select */
.form-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    background: #0c1222;
    border: 1px solid #1e2a3e;
    border-radius: 8px;
    color: #e8edf5;
    font-size: 0.875rem;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ba8c2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all var(--duration-normal) ease;
    cursor: pointer;
}

.form-select:hover {
    border-color: #2d3d56;
}

.form-select:focus {
    border-color: #4f8efa;
    box-shadow: 0 0 0 3px rgba(79, 142, 250, 0.12);
}

/* Inline form row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

/* Checkbox / Toggle */
.form-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.form-toggle-track {
    width: 40px;
    height: 22px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    position: relative;
    transition: all var(--duration-normal) ease;
}

.form-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--duration-normal) var(--ease-out);
}

.form-toggle input:checked + .form-toggle-track {
    background: var(--accent);
    border-color: var(--accent);
}

.form-toggle input:checked + .form-toggle-track::after {
    transform: translateX(18px);
    background: #fff;
}

.form-toggle-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.record-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.record-toggle-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 8px;
}

.form-section-title {
    margin: 8px 0 14px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Record type filter chips */
.type-chip.active {
    background: var(--accent-blue);
    color: #fff;
    border-color: var(--accent-blue);
}

.record-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.zone-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.zone-filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.record-toolbar-card {
    padding: 16px 18px;
}

.record-toolbar-label {
    margin-bottom: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.record-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Character counter */
.char-count {
    display: block;
    text-align: right;
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.char-count.warn {
    color: var(--warning);
}

.char-count.over {
    color: var(--danger);
}

/* --------------------------------------------------------------------------
   15. Modals
   -------------------------------------------------------------------------- */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    animation: fadeIn 150ms ease;
}

.modal {
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 48px);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 250ms var(--ease-out);
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.modal-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #e8edf5;
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--duration-normal) ease;
}

.modal-close:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
}

.modal-wide {
    max-width: 720px;
}

/* --------------------------------------------------------------------------
   16. Toasts
   -------------------------------------------------------------------------- */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideInRight 300ms var(--ease-out);
    position: relative;
    overflow: hidden;
    min-width: 320px;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
}

.toast-success::before {
    background: var(--success);
}

.toast-error::before {
    background: var(--danger);
}

.toast-warning::before {
    background: var(--warning);
}

.toast-info::before {
    background: var(--info);
}

.toast-icon {
    border: 2px solid #141c2e;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--danger);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e8edf5;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-dismiss {
    border: 2px solid #141c2e;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-xs);
    transition: all var(--duration-normal) ease;
}

.toast-dismiss:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent);
    transition: width 50ms linear;
}

.toast-success .toast-progress {
    background: var(--success);
}

.toast-error .toast-progress {
    background: var(--danger);
}

.toast-warning .toast-progress {
    background: var(--warning);
}

.toast.exiting {
    animation: slideOutRight 300ms var(--ease-out) forwards;
}

.toast:hover .toast-progress {
    animation-play-state: paused;
}

/* --------------------------------------------------------------------------
   17. Tabs
   -------------------------------------------------------------------------- */

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #1e2a3e;
}

.tab {
    padding: 12px 20px;
    color: #6b7a94;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 200ms ease;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: #9ba8c2;
}

.tab.active {
    color: #4f8efa;
    border-bottom-color: #4f8efa;
}

.tab-count {
    background: #1e2a3e;
    color: #9ba8c2;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab.active .tab-count {
    background: var(--accent-glow);
    color: var(--accent);
}

/* --------------------------------------------------------------------------
   18. Pagination
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.pagination-btn,
.page-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) ease;
    cursor: pointer;
}

.pagination-btn:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
}

.pagination-btn.active {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.pagination-info {
    margin-left: 16px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   19. Search/Filter Bar
   -------------------------------------------------------------------------- */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.filter-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.filter-search input {
    width: 100%;
    padding: 9px 14px 9px 36px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: #e8edf5;
    font-size: 0.8125rem;
    outline: none;
    transition: all var(--duration-normal) ease;
}

.filter-search input::placeholder {
    color: var(--text-muted);
}

.filter-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.filter-select {
    padding: 9px 32px 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ba8c2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: all var(--duration-normal) ease;
}

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

.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* --------------------------------------------------------------------------
   20. Pill Filters
   -------------------------------------------------------------------------- */

.pill-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    white-space: nowrap;
}

.pill:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.pill.active {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: rgba(79, 142, 250,0.30);
}

.pill-A.active {
    color: #6ba3f7;
    background: rgba(30, 58, 95, 0.50);
    border-color: rgba(96, 165, 250, 0.30);
}

.pill-AAAA.active {
    color: #b49af5;
    background: rgba(46, 16, 101, 0.50);
    border-color: rgba(167, 139, 250, 0.30);
}

.pill-MX.active {
    color: #f7a84b;
    background: rgba(67, 20, 7, 0.50);
    border-color: rgba(251, 146, 60, 0.30);
}

.pill-CNAME.active {
    color: #3dd9c0;
    background: rgba(4, 47, 46, 0.50);
    border-color: rgba(45, 212, 191, 0.30);
}

.pill-TXT.active {
    color: #9ba8c2;
    background: rgba(30, 41, 59, 0.50);
    border-color: rgba(148, 163, 184, 0.30);
}

.pill-SRV.active {
    color: #f288b5;
    background: rgba(80, 7, 36, 0.50);
    border-color: rgba(244, 114, 182, 0.30);
}

.pill-NS.active {
    color: #4fdb87;
    background: rgba(5, 46, 22, 0.50);
    border-color: rgba(74, 222, 128, 0.30);
}

.pill-CAA.active {
    color: #fbbf24;
    background: rgba(66, 32, 6, 0.50);
    border-color: rgba(251, 191, 36, 0.30);
}

/* --------------------------------------------------------------------------
   21. Activity Timeline
   -------------------------------------------------------------------------- */

.timeline {
    position: relative;
    padding-left: 24px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #1e2a3e;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-dot {
    position: absolute;
    left: -20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #141c2e;
}

.timeline-dot-create {
    background: #34d399;
}

.timeline-dot-update {
    background: #4f8efa;
}

.timeline-dot-delete {
    background: #f87171;
}

.timeline-dot-login {
    background: #818cf8;
}

.timeline-body {
    flex: 1;
    min-width: 0;
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.timeline-user {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #e8edf5;
}

.timeline-action {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-xs);
}

.timeline-action.action-create {
    background: var(--success-bg);
    color: var(--success);
}

.timeline-action.action-update {
    background: var(--info-bg);
    color: var(--info);
}

.timeline-action.action-delete {
    background: var(--danger-bg);
    color: var(--danger);
}

.timeline-action.action-login {
    background: rgba(79, 142, 250,0.12);
    color: var(--accent);
}

.timeline-resource {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.timeline-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --------------------------------------------------------------------------
   22. Empty States
   -------------------------------------------------------------------------- */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    opacity: 0.3;
    color: #6b7a94;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #e8edf5;
    margin-bottom: 8px;
}

.empty-state-text {
    font-size: 0.875rem;
    color: #6b7a94;
    margin-bottom: 24px;
}

/* --------------------------------------------------------------------------
   23. Loading States
   -------------------------------------------------------------------------- */

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #1e2a3e;
    border-top-color: #4f8efa;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}
.spinner-center {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
}


.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    flex-direction: column;
    gap: 16px;
}

.loading-text {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Skeleton shimmer */
.skeleton {
    background: linear-gradient(90deg, #141c2e 25%, #1e2a3e 50%, #141c2e 75%);
    background-size: 200%;
    animation: shimmer 1.5s infinite;
    border-radius: 6px;
}

.skeleton-text {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-heading {
    height: 24px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.skeleton-row {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.skeleton-cell {
    height: 16px;
    flex: 1;
}

.skeleton-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

/* Loading overlay */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(12, 18, 34, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
}

/* --------------------------------------------------------------------------
   24. Tooltips
   -------------------------------------------------------------------------- */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-4px);
    background: #1e2a3e;
    color: #e8edf5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

[data-tooltip]:hover::after {
    opacity: 1;
}

/* --------------------------------------------------------------------------
   25. Dropdowns
   -------------------------------------------------------------------------- */

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 180px;
    padding: 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    animation: fadeInUp 150ms var(--ease-out);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--duration-normal) ease;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 8px;
}

/* --------------------------------------------------------------------------
   26. Policy Cards
   -------------------------------------------------------------------------- */

.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.policy-card {
    background: #141c2e;
    border: 1px solid #1e2a3e;
    border-radius: 12px;
    padding: 20px;
    transition: all 200ms ease;
}

.policy-card:hover {
    border-color: #2d3d56;
}

.policy-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e8edf5;
}

.policy-card-desc {
    font-size: 0.8125rem;
    color: #6b7a94;
    margin-top: 4px;
}

.policy-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.policy-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e8edf5;
}

.policy-card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.policy-card-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.policy-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.policy-priority {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.policy-rules-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   27. Audit Diff View
   -------------------------------------------------------------------------- */

.diff-view {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    line-height: 1.6;
    background: #0c1222;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    overflow-x: auto;
}

.diff-added {
    color: var(--success);
    background: rgba(52, 211, 153, 0.08);
    padding: 1px 4px;
    border-radius: 2px;
}

.diff-removed {
    color: var(--danger);
    background: rgba(248, 113, 113,0.08);
    padding: 1px 4px;
    border-radius: 2px;
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   28. Copy Button
   -------------------------------------------------------------------------- */

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
}

.copy-btn:hover {
    color: #e8edf5;
    background: rgba(30, 42, 62,0.80);
    border-color: var(--border-hover);
}

.copy-btn.copied {
    color: var(--success);
    border-color: var(--success-border);
}

/* --------------------------------------------------------------------------
   29. Zone Detail Header
   -------------------------------------------------------------------------- */

.zone-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.zone-header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zone-name {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 700;
    color: #e8edf5;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.zone-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    flex-wrap: wrap;
}

.zone-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.zone-meta-item .mono {
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.zone-serial {
    font-family: var(--font-mono);
    color: #6b7a94;
    font-size: 13px;
}

.zone-actions {
    display: flex;
    gap: 8px;
}

.zone-actions .btn {
    padding: 8px 14px;
    font-size: 13px;
}

.zone-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Record filter pills */
.filter-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* SOA Info */
.soa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.soa-item {
    background: #0c1222;
    border: 1px solid #1e2a3e;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.soa-label {
    font-size: 11px;
    font-weight: 600;
    color: #6b7a94;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.soa-value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #e8edf5;
}

.soa-human {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   30. TTL Preset Buttons
   -------------------------------------------------------------------------- */

.ttl-presets {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.ttl-preset {
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
}

.ttl-preset:hover {
    color: var(--text-secondary);
    border-color: var(--border-hover);
}

.ttl-preset.active {
    color: var(--accent);
    background: var(--accent-glow);
    border-color: rgba(79, 142, 250,0.30);
}

/* --------------------------------------------------------------------------
   31. API Key Reveal
   -------------------------------------------------------------------------- */

.key-reveal {
    background: #0c1222;
    border: 1px solid #1e2a3e;
    border-radius: 8px;
    padding: 16px;
    margin-top: 12px;
}

.key-reveal-label {
    font-size: 12px;
    color: #f87171;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.key-reveal-value {
    font-family: var(--font-mono);
    font-size: 14px;
    color: #34d399;
    word-break: break-all;
    padding: 8px;
    background: #0f2a1e;
    border-radius: 6px;
}

.key-reveal-warning {
    font-size: 12px;
    color: #fbbf24;
    margin-top: 8px;
}

.access-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.access-profile-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)) , var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.access-profile-title-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.access-profile-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.access-profile-desc {
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}

.access-profile-perms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.theme-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
        var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--duration-normal) ease, transform var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}

.theme-option:hover,
.theme-option.active {
    border-color: var(--border-hover);
    box-shadow: 0 0 0 1px var(--accent-glow), var(--shadow-md);
    transform: translateY(-2px);
}

.theme-swatch {
    display: block;
    width: 100%;
    height: 74px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.theme-option-name {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--text-primary);
}

.theme-option-accent {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.theme-option-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   32. Grid Layouts
   -------------------------------------------------------------------------- */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* --------------------------------------------------------------------------
   33. Confirm Dialog
   -------------------------------------------------------------------------- */

.confirm-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--danger-bg);
    color: var(--danger);
}

.confirm-icon svg {
    width: 24px;
    height: 24px;
}

.confirm-text {
    text-align: center;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.confirm-warning {
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   34. Status Dot (inline)
   -------------------------------------------------------------------------- */

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 6px rgba(52, 211, 153, 0.40);
}

.status-dot.inactive {
    background: var(--text-muted);
}

.status-dot.warning {
    background: var(--warning);
    box-shadow: 0 0 6px rgba(251, 191, 36, 0.40);
}

/* --------------------------------------------------------------------------
   35. Quick Actions Row
   -------------------------------------------------------------------------- */

.quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-normal) ease;
}

.quick-action-btn:hover {
    color: #e8edf5;
    background: var(--bg-tertiary);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.quick-action-btn svg {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   36. Section Divider
   -------------------------------------------------------------------------- */

.section-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 28px 0 20px;
}

.section-divider-text {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* --------------------------------------------------------------------------
   37. Expandable Row
   -------------------------------------------------------------------------- */

.expandable-content {
    display: none;
    padding: 16px 24px;
    background: #0c1222;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 200ms ease;
}

.expandable-content.open {
    display: block;
}

.expand-toggle {
    cursor: pointer;
    transition: transform var(--duration-normal) ease;
}

.expand-toggle.open {
    transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   38. Webhook Status
   -------------------------------------------------------------------------- */

.delivery-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.delivery-status.success {
    color: var(--success);
}

.delivery-status.failed {
    color: var(--danger);
}

.delivery-status.pending {
    color: var(--warning);
}

/* --------------------------------------------------------------------------
   39. Record form type selector
   -------------------------------------------------------------------------- */

.type-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--duration-normal) ease;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.type-pill:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

.type-pill.selected {
    border-color: transparent;
}

.type-pill.selected[data-type="A"] {
    background: #1e3a5f;
    color: #6ba3f7;
}

.type-pill.selected[data-type="AAAA"] {
    background: #2e1065;
    color: #b49af5;
}

.type-pill.selected[data-type="MX"] {
    background: #431407;
    color: #f7a84b;
}

.type-pill.selected[data-type="CNAME"] {
    background: #042f2e;
    color: #3dd9c0;
}

.type-pill.selected[data-type="TXT"] {
    background: #1a2030;
    color: #9ba8c2;
}

.type-pill.selected[data-type="SRV"] {
    background: #500724;
    color: #f288b5;
}

.type-pill.selected[data-type="NS"] {
    background: #052e16;
    color: #4fdb87;
}

.type-pill.selected[data-type="CAA"] {
    background: #422006;
    color: #fbbf24;
}

.type-pill.selected[data-type="PTR"] {
    background: #1e1b4b;
    color: #818cf8;
}

/* --------------------------------------------------------------------------
   40. Scope Badges
   -------------------------------------------------------------------------- */

.scope-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.scope-badge-global {
    background: #1a2f52;
    color: #6ba3f7;
}

.scope-badge-zone {
    background: #0f2a1e;
    color: #4fdb87;
}

/* --------------------------------------------------------------------------
   40a. Audit Diff
   -------------------------------------------------------------------------- */

.diff-container {
    background: #0c1222;
    border: 1px solid #1e2a3e;
    border-radius: 8px;
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
}

.diff-line-add {
    color: #34d399;
    padding: 2px 8px;
}

.diff-line-add::before {
    content: '+ ';
}

.diff-line-remove {
    color: #f87171;
    padding: 2px 8px;
}

.diff-line-remove::before {
    content: '- ';
}

.diff-field {
    color: #6b7a94;
}

.diff-old {
    color: #f87171;
    text-decoration: line-through;
}

.diff-new {
    color: #34d399;
}

/* --------------------------------------------------------------------------
   40b. Action Badges
   -------------------------------------------------------------------------- */

.action-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.action-create {
    background: #0f2a1e;
    color: #34d399;
}

.action-update {
    background: #1a2f52;
    color: #4f8efa;
}

.action-delete {
    background: #2a0f0f;
    color: #f87171;
}

.action-login {
    background: #1a1540;
    color: #818cf8;
}

.scope-global {
    background: rgba(129, 140, 248, 0.12);
    color: #818cf8;
}

.scope-zone {
    background: rgba(79, 142, 250,0.12);
    color: #6ba3f7;
}

.scope-record {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

/* --------------------------------------------------------------------------
   40b. Audit Action Badges
   -------------------------------------------------------------------------- */

.audit-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-xs);
    text-transform: capitalize;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.audit-badge-create {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

.audit-badge-update {
    background: rgba(79, 142, 250, 0.12);
    color: #6ba3f7;
}

.audit-badge-delete {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.audit-badge-login {
    background: rgba(168, 85, 247, 0.12);
    color: #c084fc;
}

.audit-ts {
    font-size: 0.8125rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.audit-detail-link {
    cursor: pointer;
    color: var(--accent);
    font-size: 0.8125rem;
}

.audit-detail-link:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   40c. Policy Priority Number
   -------------------------------------------------------------------------- */

.policy-priority-num {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

/* --------------------------------------------------------------------------
   41. Sidebar mobile overlay
   -------------------------------------------------------------------------- */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.50);
    z-index: 150;
    animation: fadeIn 200ms ease;
    display: none;
}

.app-layout.sidebar-mobile-open .sidebar-overlay {
    display: block;
}

/* --------------------------------------------------------------------------
   42. Content transition
   -------------------------------------------------------------------------- */

.view-enter {
    animation: fadeInUp 300ms var(--ease-out);
}

/* --------------------------------------------------------------------------
   43. Tag list
   -------------------------------------------------------------------------- */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    display: inline-flex;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-radius: var(--radius-xs);
}

/* --------------------------------------------------------------------------
   44. Section card
   -------------------------------------------------------------------------- */

.section-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}

.section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}

.section-card-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #e8edf5;
}

.section-card-body {
    padding: 0;
}

/* --------------------------------------------------------------------------
   45. Truncation helpers
   -------------------------------------------------------------------------- */

.max-w-xs {
    max-width: 180px;
}

.max-w-sm {
    max-width: 240px;
}

.max-w-md {
    max-width: 320px;
}

/* --------------------------------------------------------------------------
   46. Keyframes
   -------------------------------------------------------------------------- */

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

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

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

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79, 142, 250,0.20); }
    50% { box-shadow: 0 0 0 8px rgba(79, 142, 250,0); }
}

/* --------------------------------------------------------------------------
   47. Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .policy-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .main-panel {
        grid-column: 1;
    }
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 1000;
        height: 100vh;
    }
    .sidebar-mobile-open .sidebar {
        left: 0;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar-toggle {
        display: flex;
    }
    .main-content {
        padding: 20px;
    }
    .search-box-input {
        width: 180px;
    }
    .search-box-input:focus {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .card {
        border-radius: 8px;
    }
    table {
        font-size: 13px;
    }
    .modal {
        margin: 16px;
        border-radius: 12px;
    }
    .topbar {
        padding: 0 16px;
    }
    .main-content {
        padding: 16px;
    }
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-search {
        max-width: none;
    }
    .zone-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .soa-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .user-name {
        display: none;
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .search-wrapper {
        display: none;
    }
    .search-box {
        display: none;
    }
    .topbar {
        height: 52px;
    }
    .modal {
        margin: 8px;
    }
    .modal-body {
        padding: 16px;
    }
    .toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
    .toast {
        min-width: 0;
    }
    .stat-value {
        font-size: 1.5rem;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .soa-grid {
        grid-template-columns: 1fr;
    }
    .quick-actions {
        flex-wrap: wrap;
    }
    .pill-group {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
    }
}

/* --------------------------------------------------------------------------
   48. Print Styles
   -------------------------------------------------------------------------- */

@media print {
    body,
    .main-content {
        background: white;
        color: #1a1a2e;
    }
    .sidebar,
    .topbar,
    .toast-container,
    .modal-overlay {
        display: none;
    }
    .app-layout {
        grid-template-columns: 1fr;
    }
    .main-content {
        padding: 0;
    }
    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    .data-table thead th {
        background: #f5f5f5;
        color: #333;
    }
    .data-table {
        border-collapse: collapse;
    }
    .data-table td,
    .data-table th {
        border: 1px solid #ddd;
        padding: 6px;
    }
    .badge,
    .record-badge {
        border: 1px solid #ccc;
    }
    a {
        color: #1a1a2e;
        text-decoration: none;
    }
    .page-title {
        color: #1a1a2e;
    }
}

/* --------------------------------------------------------------------------
   49. Utility Classes
   -------------------------------------------------------------------------- */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 250px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.fade-enter {
    animation: fadeIn 200ms ease;
}

.no-wrap {
    white-space: nowrap;
}

.pointer {
    cursor: pointer;
}

.text-mono {
    font-family: var(--font-mono);
}

.text-sm {
    font-size: 0.875rem;
}

.hidden {
    display: none;
}

.btn-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #1e2a3e;
    color: #9ba8c2;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 150ms;
}

.btn-copy:hover {
    background: #2d3d56;
    color: #e8edf5;
}

.btn-copy.copied {
    background: #0f2a1e;
    color: #34d399;
}

.scope-tag {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    background: #1e2a3e;
    color: #9ba8c2;
    margin: 2px;
}

.delivery-success {
    color: #34d399;
}

.delivery-failed {
    color: #f87171;
}

.delivery-pending {
    color: #fbbf24;
}

/* ==========================================================================
   STATE-OF-THE-ART ELEVATION LAYER (2026-09)
   Additive refinement pass — same selectors, later cascade wins.
   Depth · light · motion. No structural changes; safe to remove wholesale.
   ========================================================================== */

/* -- Ambient stage behind the app shell --------------------------------- */
.app-layout {
  background:
    radial-gradient(ellipse 1100px 500px at 85% -10%, rgba(46, 197, 167, 0.055), transparent 60%),
    radial-gradient(ellipse 900px 520px at -10% 110%, rgba(99, 102, 241, 0.05), transparent 60%),
    var(--bg-primary);
}

/* -- Sidebar: glass, hairline, glowing active pill ----------------------- */
.sidebar {
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-right: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.02);
}
.nav-link {
  position: relative;
  margin: 1px 8px;
  border-radius: 10px;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-link:hover {
  background: rgba(148, 163, 184, 0.08);
  transform: translateX(2px);
}
.nav-link.active {
  background: linear-gradient(90deg, var(--accent-glow), transparent 85%);
  box-shadow: inset 0 0 0 1px rgba(46, 197, 167, 0.14);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 22%;
  bottom: 22%;
  width: 3px;
  border-radius: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.nav-link.active .nav-icon {
  filter: drop-shadow(0 0 6px var(--accent-glow));
}
.sidebar-collapsed .nav-link.active::before {
  left: 2px;
}
.nav-section-label {
  letter-spacing: 0.16em;
  opacity: 0.75;
}

/* -- Topbar: floating glass bar ------------------------------------------ */
.topbar {
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 8px 24px rgba(0, 0, 0, 0.18);
}
.search-box-input:focus {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* -- Stat cards: hairline, light, lift ------------------------------------ */
.stat-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 8px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(148, 163, 184, 0.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 36px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(46, 197, 167, 0.06);
}
.stat-value {
  font-family: "Space Grotesk", "Plus Jakarta Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.stat-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* -- Cards ----------------------------------------------------------------- */
.card {
  border: 1px solid rgba(148, 163, 184, 0.11);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 24px rgba(0, 0, 0, 0.20);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease, border-color 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 32px rgba(0, 0, 0, 0.30);
}

/* -- Data tables: sticky glass header, accent hover ----------------------- */
.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(8, 17, 15, 0.92);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.data-table tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.data-table tbody tr:hover {
  background: linear-gradient(90deg, var(--accent-glow), transparent 70%);
  box-shadow: inset 2px 0 0 var(--accent);
}
.data-table tbody td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}
.data-table td.mono,
.data-table .mono {
  font-variant-numeric: tabular-nums;
}

/* -- Buttons: gradient sheen, consistent with the login -------------------- */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(46, 197, 167, 0.28), 0 1px 3px rgba(0, 0, 0, 0.22);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, filter 0.18s ease;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.20), transparent);
  transform: skewX(-18deg);
  transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(46, 197, 167, 0.38), 0 2px 6px rgba(0, 0, 0, 0.28);
  filter: brightness(1.06);
}
.btn-primary:hover::before {
  left: 120%;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-ghost {
  border-radius: 12px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-ghost:hover {
  transform: translateY(-1px);
}

/* -- Forms ------------------------------------------------------------------ */
.form-input,
.form-select {
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

/* -- Badges / chips ---------------------------------------------------------- */
.badge,
.chip {
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* -- Modal: glass + spring ---------------------------------------------------- */
.modal {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 20px;
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 32px 80px rgba(0, 0, 0, 0.55);
  animation: modalIn 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* -- Toasts --------------------------------------------------------------------- */
.toast {
  border-radius: 12px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* -- Scrollbars -------------------------------------------------------------------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(148, 163, 184, 0.38); background-clip: padding-box; }

/* -- Focus visibility: one consistent accent ring everywhere ------------------------ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* -- Reduced motion ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  .nav-link, .stat-card, .card, .btn-primary, .btn-primary::before,
  .btn-ghost, .modal, .data-table tbody tr {
    animation: none !important;
    transition: none !important;
  }
}
