/* ===== UNDNS — Core Styles ===== */

:root {
    /* Brand Colors */
    --navy: #1B2A4A;
    --teal: #2ABFBF;
    --teal-light: #3DD4D4;
    --teal-dark: #1FA3A3;

    /* Surfaces */
    --bg: #F8FAFB;
    --surface: #FFFFFF;
    --border: #E5E7EB;

    /* Text */
    --text-primary: #1B2A4A;
    --text-secondary: #6B7280;

    /* Sidebar */
    --sidebar-bg: #1B2A4A;
    --sidebar-text: #CBD5E1;
    --sidebar-active-bg: rgba(42, 191, 191, 0.1);

    /* Status */
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;

    /* Spacing & Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--teal-dark);
    text-decoration: none;
}
a:hover {
    color: var(--teal);
}

/* ===== Layout ===== */
.layout {
    display: flex;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.main-content {
    padding: 24px 32px;
    flex: 1;
}

/* ===== Auth Layout ===== */
.auth-layout {
    min-height: 100vh;
    display: flex;
    background: var(--bg);
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--sidebar-text);
    opacity: 0.6;
    transition: opacity 0.15s;
}
.sidebar-close:hover {
    opacity: 1;
}
.sidebar-close svg {
    width: 20px;
    height: 20px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
}

.sidebar-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-section-label {
    padding: 16px 24px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(203, 213, 225, 0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: var(--sidebar-text);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
}

.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--teal);
    border-left-color: var(--teal);
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Sidebar user section — hidden on desktop, visible on tablet/mobile */
.sidebar-user {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: #FFFFFF;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.sidebar-logout {
    display: block;
}

.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-text);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-logout-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

/* ===== Account Switcher ===== */
.switcher-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(203, 213, 225, 0.5);
    display: block;
    margin-bottom: 6px;
}

.switcher-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.08);
    color: var(--sidebar-text);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.switcher-select:focus {
    outline: none;
    border-color: var(--teal);
}

.switcher-select option {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
}

/* ===== Topbar ===== */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
}

.topbar-left {
    flex: 1;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.role-badge {
    font-size: 11px;
    padding: 2px 8px;
    color: white;
    border-radius: 12px;
    font-weight: 600;
}
.role-super-admin { background: var(--teal); }
.role-admin { background: #3b82f6; }
.role-staff { background: #64748b; }

/* Provider badge */
.provider-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}
.provider-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.provider-godaddy { color: #333; }
.provider-godaddy .provider-icon { color: #1bdbdb; }

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

/* Topbar logo — hidden on desktop, shown on mobile */
.topbar-logo {
    display: none;
    align-items: center;
}
.topbar-logo-img {
    height: 22px;
    width: auto;
    object-fit: contain;
}

/* ===== Content ===== */
.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.header-subtitle {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 16px;
}

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

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.form-card {
    max-width: 640px;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(42, 191, 191, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg {
    width: 24px;
    height: 24px;
    color: var(--teal);
}

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

/* ===== Detail Grid ===== */
.detail-grid {
    display: grid;
    gap: 24px;
}

.detail-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px 16px;
}

.detail-list dt {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 13px;
}

.detail-list dd {
    font-size: 14px;
}

/* ===== Login — Split Panel ===== */
.login-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.login-left {
    flex: 1;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.login-left-content {
    max-width: 480px;
}

.login-brand {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
}

.login-brand-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

.login-headline {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: #FFFFFF;
    margin-bottom: 16px;
}

.login-subline {
    font-size: 16px;
    line-height: 1.7;
    color: rgba(203, 213, 225, 0.8);
    margin-bottom: 40px;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(203, 213, 225, 0.9);
    font-size: 15px;
}

.login-feature svg {
    width: 20px;
    height: 20px;
    color: var(--teal);
    flex-shrink: 0;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px 40px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.login-header {
    margin-bottom: 32px;
}

.login-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 15px;
    color: var(--text-secondary);
}

.login-btn {
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    font-size: 13px;
    color: var(--text-secondary);
}

.login-footer strong {
    color: var(--teal-dark);
    letter-spacing: 1px;
}

/* ===== Placeholder Notice ===== */
.placeholder-notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: rgba(42, 191, 191, 0.05);
    border: 1px solid rgba(42, 191, 191, 0.15);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.placeholder-icon {
    width: 24px;
    height: 24px;
    color: var(--teal);
    flex-shrink: 0;
    margin-top: 2px;
}

.placeholder-notice h3 {
    font-size: 15px;
    margin-bottom: 4px;
}

.placeholder-notice p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ===== Confirm Delete ===== */
.confirm-delete {
    text-align: center;
    padding: 16px 0;
}
.confirm-delete h3 {
    margin-bottom: 8px;
    color: var(--error);
}
.confirm-delete p {
    margin-bottom: 20px;
    color: var(--text-secondary);
}

/* ===== Dashboard Insights ===== */
.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Expiring Domains Card */
.expiring-card {
    border-left: 4px solid var(--warning);
    margin-bottom: 24px;
}

.expiring-header {
    margin-bottom: 16px;
}

.expiring-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.expiring-title svg {
    color: var(--warning);
    flex-shrink: 0;
}

.expiring-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.expiring-badge {
    font-size: 11px;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-radius: 12px;
    font-weight: 600;
}

.expiring-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 28px;
}

.expiring-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.expiring-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.expiring-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.expiring-domain {
    display: flex;
    align-items: center;
    gap: 8px;
}

.expiring-domain svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.expiring-domain-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

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

.expiring-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.expiring-days {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
    white-space: nowrap;
}

.expiring-critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.expiring-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #92400E;
}

/* Dashboard Two-Column Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.dashboard-panel {
    display: flex;
    flex-direction: column;
}

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

.panel-header h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-count {
    font-size: 13px;
    color: var(--text-secondary);
}

.panel-footer-stat {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-footer-stat svg {
    color: var(--teal);
}

/* DNS Bar Chart */
.dns-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.dns-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dns-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 52px;
    text-align: right;
}

.dns-bar-track {
    flex: 1;
    height: 22px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.dns-bar-fill {
    height: 100%;
    border-radius: 4px;
    min-width: 4px;
    transition: width 0.4s ease;
}

/* DNS bar colors by type */
.dns-bar-a      { background: var(--teal); }
.dns-bar-aaaa   { background: #3b82f6; }
.dns-bar-cname  { background: #8b5cf6; }
.dns-bar-mx     { background: #ec4899; }
.dns-bar-txt    { background: #f59e0b; }
.dns-bar-ns     { background: #10b981; }
.dns-bar-srv    { background: #6366f1; }
.dns-bar-soa    { background: #64748b; }

.dns-bar-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 32px;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 1;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

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

.activity-icon-domain_added {
    background: rgba(42, 191, 191, 0.1);
    color: var(--teal);
}

.activity-icon-backup_created {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-icon-member_joined {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

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

.activity-text {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== Responsive ===== */

/* -- Tablet breakpoint (≤ 1023px) -- */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .main-wrapper {
        margin-left: 0;
    }
    /* Branded mobile topbar */
    .topbar {
        background: var(--navy);
        border-bottom: none;
    }
    .hamburger {
        display: block;
    }
    .hamburger svg {
        color: #FFFFFF;
    }
    .topbar-logo {
        display: flex;
    }
    .page-title {
        color: #FFFFFF;
    }
    /* Show close button inside sidebar on tablet/mobile */
    .sidebar-close {
        display: flex;
    }
    /* Hide sidebar logo — mobile sidebar shows only tabs */
    .sidebar-logo {
        display: none;
    }
    /* Show user info + logout inside sidebar */
    .sidebar-user {
        display: block;
    }
    /* Hide topbar user section */
    .topbar-right {
        display: none;
    }
}

/* -- Mobile breakpoint (≤ 767px) -- */
@media (max-width: 767px) {
    /* --- Layout & Spacing --- */
    .main-content {
        padding: 16px;
    }
    .topbar {
        height: auto;
        min-height: 52px;
        padding: 8px 12px;
        gap: 8px;
    }
    .page-title {
        font-size: 15px;
        line-height: 1.3;
    }

    /* --- Topbar adjustments (topbar-right already hidden at 1023px) --- */

    /* --- Content Headers --- */
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .content-header h2 {
        font-size: 18px;
    }
    .header-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }
    .header-actions .btn {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
        justify-content: center;
    }
    .header-subtitle {
        font-size: 14px;
    }

    /* --- Cards --- */
    .card {
        padding: 16px;
    }
    .form-card {
        max-width: 100%;
    }

    /* --- Stats Grid --- */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    .stats-grid-4 {
        grid-template-columns: 1fr 1fr;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 24px;
    }

    /* --- Dashboard Insights --- */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .expiring-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .expiring-meta {
        padding-left: 24px;
    }

    /* --- Detail Pages --- */
    .detail-list {
        grid-template-columns: 1fr;
    }
    .detail-list dt {
        margin-bottom: -8px;
    }

    /* --- Forms --- */
    .form-row {
        flex-direction: column;
    }
    .form-actions {
        flex-wrap: wrap;
        flex-direction: column;
    }
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Mobile Tables → Card Layout --- */
    .data-table thead {
        display: none;
    }
    .data-table tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .data-table tr {
        display: block;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius-md);
        padding: 12px 16px;
    }
    /* Keep DNS edit form rows hidden until .active */
    .data-table tr.dns-edit-form {
        display: none;
        border: none;
        padding: 0;
    }
    .data-table tr.dns-edit-form.active {
        display: block;
    }
    .data-table tr:hover td {
        background: transparent;
    }
    .data-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 6px 0;
        border-bottom: 1px solid var(--bg);
        font-size: 13px;
    }
    .data-table td:last-child {
        border-bottom: none;
    }
    .data-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: var(--text-secondary);
        text-transform: uppercase;
        letter-spacing: 0.3px;
        flex-shrink: 0;
        margin-right: 12px;
    }
    .data-table td:not([data-label])::before {
        display: none;
    }
    .data-table .empty-state {
        display: block;
        border: none;
    }
    .data-table .empty-state::before {
        display: none;
    }
    .value-cell {
        max-width: none;
        word-break: break-all;
        white-space: normal;
        text-align: right;
    }
    /* When a card wraps only a table, reduce padding so cards don't double-border */
    .card:has(> .data-table) {
        padding: 4px;
        border: none;
        background: transparent;
    }
    .card:has(> .dns-table-wrap) {
        padding: 12px;
    }

    /* --- Domain Add Page --- */
    .connection-grid {
        grid-template-columns: 1fr !important;
    }
    .fetch-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .fetch-actions span {
        text-align: center;
    }
    .domain-select-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    /* --- Login Page --- */
    .login-page {
        flex-direction: column;
        min-height: 100vh;
    }
    .login-left {
        padding: 28px 24px 24px;
        min-height: auto;
        flex: 0 0 auto;
    }
    .login-left-content {
        max-width: 100%;
    }
    .login-headline {
        font-size: 22px;
        margin-bottom: 10px;
    }
    .login-subline {
        margin-bottom: 16px;
        font-size: 13px;
        line-height: 1.5;
    }
    .login-brand {
        margin-bottom: 16px;
    }
    .login-brand-img {
        height: 32px;
    }
    .login-features {
        gap: 8px;
    }
    .login-feature {
        font-size: 13px;
        gap: 8px;
    }
    .login-feature svg {
        width: 16px;
        height: 16px;
    }
    .login-right {
        flex: 1;
        padding: 24px 20px 32px;
        align-items: flex-start;
    }
    .login-card {
        padding: 24px 20px;
        width: 100%;
        max-width: 100%;
    }
    .login-header h2 {
        font-size: 20px;
    }
    .login-header p {
        font-size: 13px;
    }
    .login-footer {
        margin-top: 20px;
    }

    /* --- Badges wrapping --- */
    .badge-outline {
        display: inline-block;
    }

    /* --- Placeholder notice --- */
    .placeholder-notice {
        flex-direction: column;
        gap: 12px;
    }
}

/* -- Small phone breakpoint (≤ 400px) -- */
@media (max-width: 400px) {
    .main-content {
        padding: 12px;
    }
    .card {
        padding: 12px;
    }
    .stats-grid,
    .stats-grid-4 {
        grid-template-columns: 1fr;
    }
    .stat-card {
        padding: 12px;
        gap: 12px;
    }
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    .stat-icon svg {
        width: 20px;
        height: 20px;
    }
    .stat-value {
        font-size: 22px;
    }
    .login-left {
        padding: 20px 16px;
    }
    .login-headline {
        font-size: 18px;
    }
    .login-subline {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .login-features {
        display: none;
    }
    .login-right {
        padding: 20px 16px 28px;
    }
    .login-card {
        padding: 20px 16px;
    }
}
