/* OpsCenter Premium Minimalist Light Theme Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-darker: #f1f5f9;
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --border-glow: rgba(59, 130, 246, 0.15);

    --primary-neon: #3b82f6;
    --primary-grad: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --secondary-grad: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-glow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --card-shadow-hover: 0 12px 24px -8px rgba(15, 23, 42, 0.12);

    --sidebar-width: 268px;
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 8px;
    
    /* Standard Light Badges Colors */
    --neon-success: #166534;
    --bg-success-badge: #dcfce7;
    
    --neon-warning: #854d0e;
    --bg-warning-badge: #fef9c3;
    
    --neon-danger: #991b1b;
    --bg-danger-badge: #fee2e2;
    
    --neon-info: #075985;
    --bg-info-badge: #e0f2fe;
}

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(160deg, #f8fafc 0%, #f1f5f9 45%, #e8eef5 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

body.auth-layout {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 0;
    margin: 0;
}

.auth-shell {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.auth-shell-brand {
    flex: 1;
    background: linear-gradient(145deg, #eff6ff 0%, #f8fafc 50%, #f1f5f9 100%);
    border-right: 1px solid var(--border-color);
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.auth-shell-brand-inner {
    max-width: 420px;
}

.auth-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-feature-list i {
    color: var(--primary-neon);
    font-size: 1.1rem;
}

.auth-shell-form {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
}

.auth-card {
    box-shadow: var(--card-shadow-hover);
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-neon);
}

/* Cards */
.glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-glow);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.glass-card:has(.table):hover,
.glass-card:has(.table-responsive):hover,
.glass-card:has(form):hover,
.glass-card.glass-card-static:hover {
    transform: none;
    box-shadow: var(--card-glow);
    border-color: var(--border-color);
}

.stat-card:hover,
.kb-card:hover,
.glass-card.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
    border-color: #cbd5e1;
}

/* Layout Elements */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar styling - Pure white */
#sidebar {
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    background: #ffffff;
    border-right: 1px solid var(--border-color);
    min-height: 100vh;
    min-height: 100dvh;
    transition: transform 0.3s ease, margin 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    #sidebar.active {
        margin-left: calc(-1 * var(--sidebar-width));
    }
}

@media (min-width: 768px) {
    #sidebar {
        position: sticky;
        top: 0;
        align-self: flex-start;
    }
}

#sidebar .sidebar-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
}

#sidebar .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0 1rem;
}

#sidebar ul.components {
    padding: 0;
    margin: 0;
}

.sidebar-group-label {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

#sidebar ul li a,
#sidebar ul li .sidebar-logout-btn {
    margin: 0.15rem 0.75rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
    border-radius: var(--radius-md);
    border: none;
    background: transparent;
    width: calc(100% - 1.5rem);
    text-align: left;
}

#sidebar ul li a i {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    width: 1.35rem;
    text-align: center;
    opacity: 0.85;
}

#sidebar ul li a:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

#sidebar ul li.active > a {
    color: #1d4ed8;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.12);
}

#sidebar ul li.active > a i {
    color: var(--primary-neon);
    opacity: 1;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: #fafbfc;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
}

.sidebar-user:hover {
    background: #f1f5f9;
}

.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--primary-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
}

.sidebar-user-role {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Main Content Area */
#content {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.main-content-inner {
    max-width: 1440px;
    margin: 0 auto;
}

.top-navbar {
    background: rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    padding: 0.65rem 1rem;
    box-shadow: var(--card-glow);
}

/* Custom inputs styling */
.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: var(--text-main) !important;
    border-radius: 8px !important;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    border-color: var(--primary-neon) !important;
}

.form-control::placeholder {
    color: #94a3b8;
}

/* Buttons styling */
.btn-primary {
    background: var(--primary-grad) !important;
    border: none !important;
    font-weight: 600;
    color: #ffffff !important;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    font-weight: 500;
    color: #334155 !important;
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

/* Table styling override */
.table {
    color: var(--text-main) !important;
    margin-bottom: 0;
}

.table th {
    border-top: none !important;
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 16px;
    background-color: #f8fafc;
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color) !important;
    vertical-align: middle;
    background-color: #ffffff;
}

.table-hover tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* Badge styling */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
}

/* Colored Badge fallbacks for Light Theme */
.badge.bg-success { background-color: var(--bg-success-badge) !important; color: var(--neon-success) !important; }
.badge.bg-danger { background-color: var(--bg-danger-badge) !important; color: var(--neon-danger) !important; }
.badge.bg-warning { background-color: var(--bg-warning-badge) !important; color: var(--neon-warning) !important; }
.badge.bg-primary { background-color: var(--bg-info-badge) !important; color: var(--neon-info) !important; }
.badge.bg-info { background-color: var(--bg-info-badge) !important; color: var(--neon-info) !important; }
.badge.bg-secondary { background-color: #e2e8f0 !important; color: #475569 !important; }
.badge.bg-dark { background-color: #1e293b !important; color: #f8fafc !important; }

/* Kanban Board Layout */
.kanban-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    align-items: flex-start;
}

.kanban-column {
    flex: 1;
    min-width: 280px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    backdrop-filter: blur(6px);
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.kanban-cards {
    min-height: 450px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
    cursor: grab;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, border-color 0.2s;
}

.kanban-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    border: 2px dashed var(--primary-neon);
}

/* IPAM Block Grid */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 4px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.ip-node {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.ip-node.Available { background-color: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.ip-node.Available:hover { background-color: #bbf7d0; box-shadow: 0 0 6px rgba(34, 197, 94, 0.3); }

.ip-node.Assigned { background-color: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.ip-node.Assigned:hover { background-color: #bfdbfe; box-shadow: 0 0 6px rgba(59, 130, 246, 0.3); }

.ip-node.Reserved { background-color: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.ip-node.Reserved:hover { background-color: #fef08a; box-shadow: 0 0 6px rgba(234, 179, 8, 0.3); }

.ip-node.Blocked { background-color: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.ip-node.Blocked:hover { background-color: #fecaca; box-shadow: 0 0 6px rgba(239, 68, 68, 0.3); }

.ip-node { position: relative; }
.ip-node.auto-managed::after {
    content: '★';
    position: absolute;
    top: -2px;
    right: 0;
    font-size: 7px;
    line-height: 1;
    color: #0ea5e9;
    pointer-events: none;
}
.ip-node.probe-up::before,
.ip-node.probe-down::before {
    content: '';
    position: absolute;
    bottom: 1px;
    left: 1px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    pointer-events: none;
}
.ip-node.probe-up::before { background: #22c55e; box-shadow: 0 0 3px #22c55e; }
.ip-node.probe-down::before { background: #94a3b8; }

.probe-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}
.probe-dot.probe-up { background: #22c55e; }
.probe-dot.probe-down { background: #94a3b8; }
.probe-dot.probe-pool { background: #3b82f6; }
.probe-dot.probe-free { background: #e2e8f0; border: 1px solid #cbd5e1; }

.ip-node.probe-pool::before { background: #3b82f6; box-shadow: 0 0 3px #3b82f6; }
.ip-node.probe-free::before { background: #e2e8f0; border: 1px solid #94a3b8; }

/* Global search container & overlays */
.search-results-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 450px;
    overflow-y: auto;
    z-index: 2000;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    display: none;
}

.search-module-header {
    background: #f8fafc;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-neon);
    border-bottom: 1px solid var(--border-color);
}

.search-item {
    padding: 10px 16px;
    display: block;
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #f1f5f9;
}

.search-item:hover {
    background: #f1f5f9;
    color: var(--primary-neon);
}

/* Timeline Components */
.timeline-logs {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-left: 10px;
    position: relative;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-neon);
    border: 2px solid #ffffff;
    box-shadow: 0 0 6px rgba(59, 130, 246, 0.4);
}

.timeline-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Quick stats cards styling */
.stat-icon {
    font-size: 2rem;
    color: var(--primary-neon);
}

.dashboard-widget-title {
    font-weight: 600;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.dashboard-widget-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.stat-card {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--stat-accent, var(--primary-neon));
    border-radius: 4px 0 0 4px;
}

.stat-card .stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: color-mix(in srgb, var(--stat-accent, var(--primary-neon)) 12%, white);
    color: var(--stat-accent, var(--primary-neon));
    margin-bottom: 0.75rem;
}

.stat-card--tasks { --stat-accent: #3b82f6; }
.stat-card--incidents { --stat-accent: #ef4444; }
.stat-card--servers { --stat-accent: #06b6d4; }
.stat-card--clients { --stat-accent: #22c55e; }
.stat-card--projects { --stat-accent: #f59e0b; }
.stat-card--ips { --stat-accent: #8b5cf6; }
.stat-card--backups-ok { --stat-accent: #22c55e; }
.stat-card--backups-failed { --stat-accent: #ef4444; }
.stat-card--backups-stale { --stat-accent: #f59e0b; }
.stat-card--backups-never { --stat-accent: #94a3b8; }

/* Task timer */
.task-timer-panel {
    border-left: 4px solid var(--primary-neon);
}

.task-timer-display {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    letter-spacing: 0.06em;
    color: var(--text-main);
    line-height: 1;
}

.kanban-card [data-task-timer-display] {
    font-size: 0.8rem;
    font-weight: 600;
}

.stat-card.glass-card-static:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

/* Interactive procedure checklist styling */
.checklist-item {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.checklist-item:hover {
    background: #f1f5f9;
}

.checklist-item.checked {
    opacity: 0.7;
    background: #f8fafc;
    border-color: #bbf7d0;
}

.checklist-item.checked .checklist-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.checklist-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    margin-right: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #166534;
}

.checklist-checkbox.checked {
    background-color: #dcfce7;
    border-color: #86efac;
}

.checklist-checkbox.checked::before {
    content: '✓';
    font-weight: bold;
}

/* Server notes */
.server-note-card {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.server-note-card.is-pinned {
    border-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #f8fafc 100%);
    box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.server-note-content {
    white-space: pre-wrap;
    word-break: break-word;
    line-height: 1.55;
    max-height: 220px;
    overflow-y: auto;
}

.server-note-meta {
    border-top: 1px solid var(--border-color);
    padding-top: 0.65rem;
}

.note-filter.active {
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* ── Layout utilities ── */
.btn-icon {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.page-header h1,
.page-header h2 {
    font-size: clamp(1.35rem, 4vw, 1.65rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.35rem;
}

.page-header p {
    font-size: 0.9rem;
    line-height: 1.55;
    color: var(--text-muted);
    max-width: 42rem;
}

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

.empty-state i {
    font-size: 2.5rem;
    opacity: 0.35;
    display: block;
    margin-bottom: 1rem;
}

.empty-state h5 {
    color: var(--text-main);
    font-weight: 600;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.page-actions .btn {
    flex: 1 1 auto;
}

.flash-alert {
    position: relative;
    padding-right: 3rem;
    overflow: hidden;
}

.flash-alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.25;
    animation: flash-progress 6s linear forwards;
}

@keyframes flash-progress {
    from { width: 100%; }
    to { width: 0%; }
}

.flash-alert .btn-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
}

/* Sidebar overlay (mobile) */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1040;
    opacity: 0;
    transition: opacity 0.25s ease;
    backdrop-filter: blur(2px);
}

.sidebar-backdrop.show {
    display: block;
    opacity: 1;
}

/* Top navbar */
.top-navbar {
    flex-wrap: wrap;
}

.top-navbar > .container-fluid {
    width: 100%;
}

.navbar-search-desktop {
    max-width: 400px;
}

.navbar-search-mobile {
    width: 100%;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5rem;
}

.navbar-search-mobile[hidden] {
    display: none !important;
}

/* Table scroll hint */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    position: relative;
}

.table-responsive.is-scrollable::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 28px;
    pointer-events: none;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.95), transparent);
    border-radius: 0 12px 12px 0;
}

/* Mobile stacked tables */
@media (max-width: 767.98px) {
    .table-responsive .table.table-stack {
        border: 0;
    }

    .table-responsive .table.table-stack thead {
        display: none;
    }

    .table-responsive .table.table-stack tbody tr {
        display: block;
        margin-bottom: 0.85rem;
        border: 1px solid var(--border-color);
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }

    .table-responsive .table.table-stack tbody tr:hover td {
        background-color: #ffffff !important;
    }

    .table-responsive .table.table-stack tbody td {
        display: flex !important;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #f1f5f9 !important;
        text-align: right !important;
    }

    .table-responsive .table.table-stack tbody td:last-child {
        border-bottom: 0 !important;
        background: #f8fafc;
        justify-content: flex-end;
    }

    .table-responsive .table.table-stack tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
        max-width: 42%;
    }

    .table-responsive .table.table-stack tbody td.text-end {
        text-align: right !important;
    }

    .table-responsive .table.table-stack .btn-group {
        margin-left: auto;
    }
}

/* Sticky form actions on mobile */
.form-actions-sticky {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background: linear-gradient(to top, var(--bg-darker) 70%, transparent);
    padding: 1rem 0 0.5rem;
    margin-top: 1rem;
}

/* Touch-friendly: disable hover lift on cards */
@media (hover: none) {
    .glass-card:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
}

/* ── Responsive breakpoints ── */
@media (max-width: 991.98px) {
    #content {
        padding: 16px;
    }

    .dashboard-widget-val {
        font-size: 1.45rem;
    }

    .kanban-column {
        min-width: 260px;
    }
}

@media (max-width: 767.98px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        height: 100dvh;
        margin-left: -280px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
        overflow-y: auto;
    }

    #sidebar.active {
        margin-left: 0;
    }

    #sidebar .sidebar-header {
        padding: 18px 20px;
    }

    #sidebar ul li a {
        padding: 14px 20px;
        min-height: 48px;
    }

    #content {
        padding: 12px;
        width: 100%;
    }

    .navbar {
        padding: 10px 14px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .glass-card {
        border-radius: 12px;
    }

    .glass-card.p-4,
    .glass-card.p-5 {
        padding: 1.15rem !important;
    }

    .table th,
    .table td {
        padding: 12px;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        min-height: 44px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .pagination .page-link {
        padding: 10px 14px;
        min-width: 44px;
        text-align: center;
    }

    .ip-grid {
        grid-template-columns: repeat(auto-fill, minmax(24px, 1fr));
        gap: 3px;
        padding: 8px;
    }

    .search-results-dropdown {
        max-height: min(60vh, 400px);
    }

    .filter-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap !important;
        padding-bottom: 4px;
    }

    .filter-scroll .btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
}

@media (max-width: 575.98px) {
    .page-header .col-sm-6.text-sm-end {
        text-align: left !important;
    }

    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-group .btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Custom premium pagination styles */
.pagination .page-link {
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 0 3px;
    padding: 8px 14px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    color: var(--primary-neon);
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link {
    background: var(--primary-grad) !important;
    border-color: var(--primary-neon) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.pagination .page-item.disabled .page-link {
    color: var(--text-muted);
    background-color: #f8fafc;
    border-color: var(--border-color);
    opacity: 0.6;
}

/* Knowledge Base */
.kb-search-input {
    border-radius: 999px;
    padding-left: 2.5rem;
}
.kb-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.kb-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kb-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}
.kb-card .kb-card-title a:hover {
    color: var(--primary-neon) !important;
}
.kb-toc-link {
    display: block;
    padding: 0.35rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
}
.kb-toc-link:hover {
    color: var(--primary-neon);
    border-left-color: var(--primary-neon);
}
.kb-toc-h3 .kb-toc-link {
    padding-left: 1.25rem;
    font-size: 0.8125rem;
}
.kb-copy-code {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    opacity: 0.7;
}
.kb-copy-code:hover {
    opacity: 1;
}
.kb-share-layout {
    background: #f8fafc;
    min-height: 100vh;
}
.kb-share-header {
    background: #fff;
}
.kb-share-url-input {
    font-size: 0.8rem;
}
.markdown-body table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.markdown-body th,
.markdown-body td {
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
}
.markdown-body th {
    background: #f8fafc;
}
