:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --primary-subtle: #f0fdf4;
    --secondary: #14532d;
    --secondary-light: #1a3c2a;
    --accent: #22c55e;
    --bg: #f9fafb;
    --card-bg: #ffffff;
    --text: #1a1a2e;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --sidebar-width: 260px;
    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
}

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

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

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--secondary);
    color: #fff;
    overflow-y: auto;
    z-index: 100;
    transition: width 0.25s ease;
    border-right: 1px solid rgba(255,255,255,0.05);
}

/* Sidebar collapse toggle button */
.sidebar-collapse-btn {
    position: absolute;
    top: 1.15rem;
    right: 0.75rem;
    width: 26px; height: 26px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: rgba(255,255,255,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.6rem;
    z-index: 101;
    transition: all 0.15s;
}
.sidebar-collapse-btn:hover { color: #fff; background: rgba(255,255,255,0.12); }
.sidebar-collapse-btn i { transition: transform 0.25s; }

/* Collapsed sidebar */
.sidebar.collapsed { width: 62px; overflow: visible; }
.sidebar.collapsed .sidebar-collapse-btn { right: 50%; transform: translateX(50%); top: 0.65rem; }
.sidebar.collapsed .sidebar-collapse-btn i { transform: rotate(180deg); }

.sidebar.collapsed .sidebar-header { padding: 2.5rem 0 0.5rem; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.06); }
.sidebar.collapsed .sidebar-header h2 { justify-content: center; font-size: 1.15rem; }
.sidebar.collapsed .sidebar-header h2 i { color: var(--accent); }
.sidebar.collapsed .sidebar-header h2 span,
.sidebar.collapsed .sidebar-header p { display: none; }

.sidebar.collapsed .sidebar-nav a {
    justify-content: center;
    padding: 0.7rem 0;
    border-left: none;
    position: relative;
    margin: 0.1rem 0.5rem;
    border-radius: 8px;
}
.sidebar.collapsed .sidebar-nav a.active {
    background: rgba(22,163,74,0.25);
    border-left: none;
}
.sidebar.collapsed .sidebar-nav a span,
.sidebar.collapsed .sidebar-nav .nav-number { display: none; }
.sidebar.collapsed .sidebar-nav a i { margin: 0; font-size: 1rem; width: auto; }

/* Tooltip on hover for collapsed nav items */
.sidebar.collapsed .sidebar-nav a:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 8px;
    background: var(--secondary);
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    z-index: 200;
}

.sidebar.collapsed .sidebar-user { flex-direction: column; padding: 0.6rem 0.4rem; gap: 0; }
.sidebar.collapsed .user-details { display: none; }
.sidebar.collapsed .user-avatar { width: 28px; height: 28px; font-size: 0.75rem; }
.sidebar.collapsed .btn-logout { font-size: 0.8rem; margin-top: 0.35rem; }
.sidebar.collapsed .sidebar-login-btn { padding: 0.45rem; }
.sidebar.collapsed .sidebar-login-btn span { display: none; }

/* Dividers in collapsed mode */
.sidebar.collapsed .sidebar-nav div[style*="border-top"] { margin: 0.3rem 0.5rem; }

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header h2 i {
    color: var(--accent);
}

.sidebar-header p {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.2rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 500;
}

/* Workspace switcher in sidebar header */
.sidebar-workspace {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.55rem;
    margin-top: 0.65rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
    cursor: pointer;
}
.sidebar-workspace:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
}
.sidebar-workspace .ws-avatar {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.7rem;
    color: #fff;
    flex-shrink: 0;
}
.sidebar-workspace .ws-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}
.sidebar-workspace .ws-name {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255,255,255,0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.sidebar-workspace .ws-plan {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.38);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 0.1rem;
}
.sidebar-workspace .ws-switch {
    font-size: 0.58rem;
    color: rgba(255,255,255,0.25);
    transition: color 0.15s;
}
.sidebar-workspace:hover .ws-switch {
    color: rgba(255,255,255,0.5);
}
/* Hide workspace details when sidebar is collapsed */
.sidebar.collapsed .sidebar-workspace .ws-info,
.sidebar.collapsed .sidebar-workspace .ws-switch { display: none; }
.sidebar.collapsed .sidebar-workspace {
    justify-content: center;
    padding: 0.35rem;
    margin-top: 0.4rem;
}

/* Logout confirmation modal */
.logout-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.logout-modal-overlay.visible { display: flex; }
.logout-modal {
    background: #fff;
    border-radius: 14px;
    padding: 2rem 2rem 1.5rem;
    width: 360px;
    max-width: 90vw;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: modalIn 0.2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.logout-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #fef2f2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}
.logout-modal h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.35rem;
}
.logout-modal p {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}
.logout-modal-actions {
    display: flex;
    gap: 0.65rem;
}
.logout-modal-cancel {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #374151;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}
.logout-modal-cancel:hover { background: #f1f5f9; }
.logout-modal-confirm {
    flex: 1;
    padding: 0.6rem;
    border-radius: 8px;
    border: none;
    background: #dc2626;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}
.logout-modal-confirm:hover { background: #b91c1c; }

.sidebar-nav { padding: 0.5rem 0 5rem; }

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 1.25rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.sidebar-nav a.active {
    color: #fff;
    background: rgba(22,163,74,0.2);
    border-left-color: var(--accent);
}

.sidebar-nav a i { width: 18px; text-align: center; font-size: 0.8rem; }

.nav-number {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    min-width: 20px;
}

/* ===== Sidebar User Section ===== */
.sidebar-user {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow: hidden;
}

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

.user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role { margin-top: 0.15rem; }

.btn-logout {
    color: rgba(255,255,255,0.4);
    font-size: 0.9rem;
    padding: 0.35rem;
    border-radius: 6px;
    transition: all 0.15s;
    text-decoration: none;
    flex-shrink: 0;
}
.btn-logout:hover { color: #ef4444; background: rgba(239,68,68,0.1); }

.sidebar-login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    width: 100%;
    justify-content: center;
    transition: all 0.15s;
}
.sidebar-login-btn:hover { color: #fff; border-color: var(--accent); background: rgba(22,163,74,0.15); }

/* ===== Role Badges ===== */
.role-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ip-chip {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
}

.role-user { background: #f3f4f6; color: #6b7280; }
.role-developer { background: #dcfce7; color: #166534; }
.role-manager { background: #fef3c7; color: #92400e; }
.role-admin { background: #fee2e2; color: #991b1b; }

/* ===== Main content ===== */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.25s ease;
}

body.sidebar-collapsed .main-content {
    margin-left: 62px;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a4731 50%, #14532d 100%);
    color: #fff;
    padding: 2.75rem 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2322c55e' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero::after {
    content: '';
    position: absolute;
    top: -40%; right: -15%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(34,197,94,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    position: relative;
    z-index: 1;
}

.hero p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    max-width: 650px;
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    font-family: inherit;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 1px 3px rgba(22,163,74,0.3);
}
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(22,163,74,0.35); }

.btn-secondary {
    background: #f3f4f6;
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #e5e7eb; }

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
}
.btn-outline-light:hover { background: rgba(255,255,255,0.08); }

.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
.btn-xs { padding: 0.25rem 0.45rem; font-size: 0.73rem; border-radius: 6px; }

.link-primary { color: var(--primary); text-decoration: none; font-weight: 500; }
.link-primary:hover { text-decoration: underline; }

/* ===== Section cards grid ===== */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
    padding: 2rem 3rem;
}

.section-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.35rem;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--text);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: var(--shadow-sm);
}

.section-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(22,163,74,0.1);
    transform: translateY(-2px);
}

.section-card .card-icon {
    width: 42px; height: 42px;
    background: var(--primary-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1rem;
}

.section-card .card-number {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.section-card h3 { font-size: 0.95rem; font-weight: 600; }

.copy-link-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    width: 30px; height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
    flex-shrink: 0;
}
.copy-link-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-subtle); }
.copy-link-btn.copied { border-color: var(--primary); color: #fff; background: var(--primary); animation: copiedPop 0.3s ease; }

@keyframes copiedPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ===== Toast Notification ===== */
.copy-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--secondary);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    min-width: 280px;
    max-width: 420px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid var(--primary);
}

.copy-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.copy-toast.hide {
    transform: translateY(20px);
    opacity: 0;
}

.toast-icon {
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.toast-body { overflow: hidden; }

.toast-msg {
    font-size: 0.88rem;
    font-weight: 700;
}

.toast-detail {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    margin-top: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .copy-toast { left: 1rem; right: 1rem; bottom: 1rem; min-width: 0; }
}

/* ===== Section page ===== */
.section-header {
    background: linear-gradient(135deg, var(--secondary) 0%, #1a4731 100%);
    color: #fff;
    padding: 2.25rem 3rem;
}

.section-header .badge {
    display: inline-block;
    background: rgba(34,197,94,0.2);
    color: #86efac;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.section-header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.section-body {
    padding: 2rem 3rem;
}

.section-body h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 2rem 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.section-body h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.section-body p { margin-bottom: 0.85rem; color: #374151; }
.section-body ul, .section-body ol { margin: 0.5rem 0 1rem 1.25rem; }
.section-body li { margin-bottom: 0.4rem; color: #374151; }
.section-body strong { color: var(--secondary); }

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

thead { background: var(--secondary); color: #fff; }

th {
    padding: 0.65rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td { padding: 0.65rem 1rem; border-bottom: 1px solid var(--border-light); }
tbody tr:hover { background: var(--primary-subtle); }
tbody tr:last-child td { border-bottom: none; }

/* ===== Status & Priority Badges ===== */
.status-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-planning { background: #ede9fe; color: #5b21b6; }
.status-upcoming { background: #fdf4ff; color: #86198f; }
.status-coming-soon { background: #fff7ed; color: #c2410c; }
.status-in-development { background: #fef3c7; color: #b45309; }
.status-in-progress { background: #fef3c7; color: #b45309; }
.status-testing { background: #fce7f3; color: #be185d; }
.status-staging { background: #e0e7ff; color: #4338ca; }
.status-released { background: #dcfce7; color: #166534; }
.status-completed { background: #dcfce7; color: #166534; }
.status-active { background: #dcfce7; color: #166534; }
.status-deprecated { background: #fee2e2; color: #991b1b; }
.status-end-of-life { background: #f3f4f6; color: #6b7280; }
.status-maintenance { background: #dbeafe; color: #1e40af; }
.status-planned { background: #ede9fe; color: #5b21b6; }
.status-deferred { background: #f3f4f6; color: #6b7280; }

.priority-badge {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
}

.priority-low { background: #f3f4f6; color: #6b7280; }
.priority-medium { background: #dbeafe; color: #1e40af; }
.priority-high { background: #fef3c7; color: #b45309; }
.priority-critical { background: #fee2e2; color: #991b1b; }

/* ===== Tech tags ===== */
.tech-tag {
    display: inline-block;
    background: rgba(34,197,94,0.15);
    color: #86efac;
    padding: 0.18rem 0.55rem;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 600;
}

/* ===== Stats Row ===== */
.stats-row {
    display: flex;
    gap: 0.85rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 110px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.7rem 1.15rem;
    border: none;
    background: none;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

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

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== Modals ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20,83,45,0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background: var(--card-bg);
    border-radius: 14px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--secondary);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem;
    border-radius: 4px;
    transition: all 0.15s;
}
.btn-close:hover { color: var(--text); background: #f3f4f6; }

.modal form { padding: 1.25rem 1.5rem; }

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

/* ===== Forms ===== */
.form-group {
    margin-bottom: 0.85rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.3rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    transition: all 0.15s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
}

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

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

.empty-state h3 {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state-sm {
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    background: var(--primary-subtle);
    border: 1.5px dashed #bbf7d0;
    border-radius: var(--radius);
    font-size: 0.88rem;
}

/* ===== Architecture Grid ===== */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.85rem;
}

.arch-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.15rem;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}

.arch-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(22,163,74,0.08); }

.arch-type-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ===== Code blocks ===== */
.code-block {
    background: #1a2332;
    color: #d1d5db;
    padding: 1.15rem;
    border-radius: var(--radius);
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 0.82rem;
    overflow-x: auto;
    margin: 0.85rem 0;
    line-height: 1.6;
    white-space: pre;
    border: 1px solid #2d3748;
}

/* ===== Callout boxes ===== */
.callout {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius);
    margin: 0.85rem 0;
    font-size: 0.87rem;
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.callout i { margin-top: 0.12rem; }
.callout-info { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.callout-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.callout-tip { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }

/* ===== Lifecycle flow ===== */
.flow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 1.25rem 0;
}

.flow-step { background: var(--primary); color: #fff; padding: 0.45rem 0.9rem; border-radius: 7px; font-size: 0.82rem; font-weight: 600; }
.flow-arrow { color: var(--text-muted); font-size: 1.1rem; }

/* ===== Checklist ===== */
.checklist { list-style: none; margin-left: 0; }

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
}

.checklist li:hover { border-color: var(--primary); }
.checklist li.checked { background: var(--primary-subtle); border-color: var(--accent); }
.checklist li.checked .check-label { text-decoration: line-through; color: var(--text-muted); }

.check-box {
    width: 18px; height: 18px;
    border: 2px solid var(--border);
    border-radius: 4px;
    flex-shrink: 0;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.checked .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== Section Navigation ===== */
.section-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.75rem 3rem;
    border-top: 1px solid var(--border);
}

.section-nav a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s;
    box-shadow: var(--shadow-sm);
}

.section-nav a:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Timeline ===== */
.timeline { position: relative; padding-left: 2rem; margin: 1.25rem 0; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 2px; background: var(--primary-light); }
.timeline-item { position: relative; margin-bottom: 1.25rem; padding-left: 1rem; }
.timeline-item::before { content: ''; position: absolute; left: -2rem; top: 0.35rem; width: 14px; height: 14px; background: var(--primary); border-radius: 50%; border: 3px solid var(--primary-light); }
.timeline-item h3 { margin: 0 0 0.4rem; }

/* ===== Tier cards ===== */
.tier-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 0.85rem; box-shadow: var(--shadow-sm); }
.tier-card h3 { margin-top: 0; }
.tier-badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: 5px; font-size: 0.72rem; font-weight: 700; margin-bottom: 0.6rem; }
.tier-1 { background: #dcfce7; color: #166534; }
.tier-2 { background: #fef3c7; color: #92400e; }
.tier-3 { background: #fce7f3; color: #9d174d; }

/* ===== Filter Toolbar ===== */
.board-toolbar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.filter-search {
    padding: 0.45rem 0.7rem 0.45rem 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.84rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    min-width: 200px;
    transition: border-color 0.15s;
}
.filter-search:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,0.1); }
.filter-search::placeholder { color: #9ca3af; }

.filter-select {
    padding: 0.45rem 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s;
}
.filter-select:focus { outline: none; border-color: var(--primary); }

/* ===== Product Settings ===== */
.settings-grid {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.settings-vertical {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.settings-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 767px) {
    .settings-row-2col { grid-template-columns: 1fr; }
}

.settings-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.settings-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.settings-card-title i { color: var(--primary); font-size: 0.85rem; }

.settings-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0 0 0.85rem;
}

/* Tag chips input */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.6rem;
    min-height: 30px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s;
}

.tag-chip:hover { background: #bbf7d0; }

.tag-remove {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.tag-remove:hover { opacity: 1; color: var(--danger); }

.tag-add-row {
    display: flex;
    gap: 0.35rem;
}

.tag-add-input {
    flex: 1;
    padding: 0.35rem 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    transition: border-color 0.15s;
}
.tag-add-input:focus { outline: none; border-color: var(--primary); }
.tag-add-input::placeholder { color: #9ca3af; }

/* Logo upload */
.logo-upload-area { text-align: center; }

.logo-preview {
    max-width: 180px;
    max-height: 120px;
    border-radius: 8px;
    border: 1px solid var(--border);
    object-fit: contain;
    background: #f9fafb;
}

.logo-placeholder {
    width: 180px;
    height: 100px;
    border: 2px dashed var(--border);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: var(--text-muted);
    margin: 0 auto;
}

.logo-placeholder i { font-size: 1.5rem; }
.logo-placeholder span { font-size: 0.78rem; font-weight: 500; }

.logo-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.saved-asset {
    padding: 0.85rem;
    background: var(--primary-subtle);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
    border-radius: 10px;
    margin-bottom: 0.5rem;
}

.saved-asset-url {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    word-break: break-all;
}

.saved-asset-url i { color: var(--primary); margin-right: 0.2rem; }

.saved-asset-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.65rem;
}

.file-input {
    font-size: 0.78rem;
    font-family: inherit;
    max-width: 180px;
}

/* Theme customizer */
.theme-preview {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}

.tp-hero {
    background: linear-gradient(135deg, #14532d 0%, rgba(22,163,74,0.2) 100%);
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tp-logo {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(22,163,74,0.25);
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
}

.tp-title { color: #fff; font-weight: 800; font-size: 1.1rem; }
.tp-subtitle { color: rgba(255,255,255,0.6); font-size: 0.78rem; display: none; }

.tp-body { padding: 0.75rem 1rem 1rem; background: #fff; }

.tp-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0.75rem;
}

.tp-nav-item {
    padding: 0.4rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #9ca3af;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.tp-nav-active {
    color: #16a34a;
    border-bottom-color: #16a34a;
}

.tp-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.65rem;
}

.tp-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(22,163,74,0.12);
    color: #16a34a;
    margin-bottom: 0.3rem;
}

.tp-card-title { font-size: 0.82rem; font-weight: 700; color: #1a1a2e; }
.tp-card-desc { font-size: 0.72rem; color: #6b7280; margin-top: 0.2rem; }

/* Theme controls */
.theme-controls { }

.theme-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.theme-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.color-pick {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.color-pick input[type="color"] {
    width: 34px; height: 34px;
    border: 2px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: none;
    flex-shrink: 0;
}

.color-text {
    flex: 1;
    padding: 0.35rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text);
    width: 100%;
}
.color-text:focus { outline: none; border-color: var(--primary); }

.theme-field select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: inherit;
    color: var(--text);
    background: #fff;
}

@media (max-width: 767px) {
    .settings-grid { flex-direction: column; }
    .theme-row { grid-template-columns: 1fr; }
}

/* ===== Custom Links ===== */
.custom-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-bottom: 0.6rem;
    padding: 0.65rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.cl-fields {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cl-fields input {
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: 0.84rem;
    font-family: inherit;
    color: var(--text);
}

.cl-fields input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(22,163,74,0.1); }
.cl-fields input::placeholder { color: #9ca3af; }

.custom-link-row .btn-danger { margin-top: 0.25rem; }

.custom-link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    color: rgba(255,255,255,0.8);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.custom-link-chip:hover { background: rgba(255,255,255,0.18); color: #fff; }
.custom-link-chip i { font-size: 0.65rem; }

/* ===== Feature Detail Card ===== */
.fd-card {}
.fd-badges { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }
.fd-title { font-size: 1.25rem; font-weight: 800; color: var(--secondary); margin: 0 0 1rem; line-height: 1.3; }
.fd-section { margin-bottom: 1rem; }
.fd-section label { display: block; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.3rem; }
.fd-section p { font-size: 0.9rem; color: var(--text); line-height: 1.6; margin: 0; }
.fd-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.25rem 0; padding: 1rem; background: var(--bg); border-radius: 8px; border: 1px solid var(--border); }
.fd-meta label { display: block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.25rem; }
.fd-meta label i { width: 14px; }
.fd-meta span { font-size: 0.87rem; font-weight: 500; color: var(--text); }
.fd-actions { padding-top: 1rem; border-top: 1px solid var(--border); }

/* ===== View Toggle ===== */
.view-toggle {
    display: inline-flex;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.vt-btn {
    background: #fff;
    border: none;
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.vt-btn:not(:last-child) { border-right: 1.5px solid var(--border); }

.vt-btn.active {
    background: var(--primary);
    color: #fff;
}

.vt-btn:hover:not(.active) { background: #f3f4f6; color: var(--text); }

/* ===== Kanban Board ===== */
.kanban {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    min-height: 400px;
}

.kanban-col {
    min-width: 230px;
    max-width: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kanban-col-header {
    padding: 0.65rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}

.kanban-col-header i { margin-right: 0.3rem; }

.kanban-count {
    background: var(--border-light);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.kanban-cards {
    flex: 1;
    background: #f3f4f6;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
    max-height: 600px;
}

.kanban-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.15s;
    cursor: default;
    box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(22,163,74,0.1);
}

.kc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.kc-edit {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.15s;
}
.kc-edit:hover { background: #f3f4f6; color: var(--text); }

.kc-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
    line-height: 1.3;
}

.kc-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
    line-height: 1.4;
}

.kc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.6rem;
    gap: 0.4rem;
}

.kc-assignee {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.kc-version {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
}

/* ===== Version Compare ===== */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.compare-col { padding: 0; }

.compare-header {
    padding: 1rem 1.25rem;
    background: var(--primary-subtle);
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.compare-header h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 0;
}

.compare-notes {
    padding: 0.65rem 1.25rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: #fafafa;
    border-bottom: 1px solid var(--border);
    margin: 0;
}

.compare-feats { padding: 0.5rem; }

.compare-feat {
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #fff;
}

.compare-feat .cf-header {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.compare-feat h4 {
    font-size: 0.87rem;
    font-weight: 600;
    margin: 0;
    color: var(--text);
}

.compare-feat p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.3rem 0 0;
    line-height: 1.4;
}

.compare-feat .cf-assignee {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.compare-divider {
    width: 1px;
    background: var(--border);
}

/* Responsive handled in single block below */

/* ===== Activity Log ===== */
.activity-list { margin: 0; }

.activity-date-header {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.25rem 0 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.activity-date-header:first-child { padding-top: 0; }

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

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

.activity-icon {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.activity-icon-created { background: #dcfce7; color: #166534; }
.activity-icon-updated { background: #dbeafe; color: #1e40af; }
.activity-icon-deleted { background: #fee2e2; color: #991b1b; }
.activity-icon-logged_in { background: #f0fdf4; color: #16a34a; }
.activity-icon-logged_out { background: #f3f4f6; color: #6b7280; }

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

.activity-main {
    font-size: 0.87rem;
    color: var(--text);
    line-height: 1.5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}

.activity-user { font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }

.activity-action-badge {
    display: inline-block;
    padding: 0.08rem 0.4rem;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
}

.action-created { background: #dcfce7; color: #166534; }
.action-updated { background: #dbeafe; color: #1e40af; }
.action-deleted { background: #fee2e2; color: #991b1b; }
.action-logged_in { background: #f0fdf4; color: #16a34a; }
.action-logged_out { background: #f3f4f6; color: #6b7280; }

.activity-entity-type { color: var(--text-muted); font-size: 0.84rem; }
.activity-in { color: var(--text-muted); font-size: 0.82rem; }
.activity-product { color: var(--primary); font-weight: 500; font-size: 0.84rem; }

.activity-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: var(--text-muted);
}

.activity-time { font-weight: 500; }

.activity-detail {
    background: var(--border-light);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.72rem;
}

.activity-total {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* Filter group with label */
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.filter-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: var(--card-bg);
    transition: all 0.15s;
}

.page-btn:hover:not(.active):not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

.page-btn.disabled {
    color: var(--border);
    cursor: default;
}

.page-dots {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0 0.2rem;
}

.page-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
}

@media (max-width: 767px) {
    .filter-group { flex: 1 1 calc(50% - 0.3rem); }
    .page-info { display: none; }
}

/* ===== Mobile ===== */
.menu-toggle {
    display: none;
    position: fixed;
    top: 0.75rem; left: 0.75rem;
    z-index: 200;
    background: var(--secondary);
    color: #fff;
    border: none;
    width: 42px; height: 42px;
    border-radius: 10px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVE — Large desktops (1400px+) ===== */
@media (min-width: 1400px) {
    .sections-grid { grid-template-columns: repeat(4, 1fr); }
    .kanban-col { min-width: 200px; }
}

/* ===== RESPONSIVE — Medium desktops / landscape tablets (1024–1399px) ===== */
@media (max-width: 1399px) {
    .kanban-col { min-width: 190px; }
}

/* ===== RESPONSIVE — Tablets & small laptops (768–1023px) ===== */
@media (max-width: 1023px) {
    :root { --sidebar-width: 220px; }
    .hero { padding: 2rem 2rem; }
    .hero h1 { font-size: 1.65rem; }
    .section-header { padding: 2rem 2rem; }
    .section-body { padding: 1.5rem 2rem; }
    .sections-grid { padding: 1.5rem 2rem; gap: 1rem; }
    .section-nav { padding: 1.5rem 2rem; }
    .stats-row { gap: 0.65rem; }
    .stat-card { padding: 0.85rem; }
    .stat-number { font-size: 1.5rem; }
    .kanban { gap: 0.5rem; }
    .kanban-col { min-width: 170px; max-width: 220px; }
    .kanban-card { padding: 0.6rem; }
    .kc-title { font-size: 0.8rem; }
    .kc-desc { font-size: 0.73rem; }
    .compare-grid { gap: 0; }
    .arch-grid { grid-template-columns: 1fr 1fr; }
    .board-toolbar { gap: 0.45rem; }
    .filter-search { min-width: 150px; }
}

/* ===== RESPONSIVE — Mobile / Portrait tablets (max 767px) ===== */
@media (max-width: 767px) {
    /* Sidebar off-canvas */
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; }
    .sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px rgba(0,0,0,0.3); }
    .sidebar.collapsed { transform: translateX(-100%); }
    .main-content, body.sidebar-collapsed .main-content { margin-left: 0 !important; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-collapse-btn { display: none; }

    /* Hero */
    .hero { padding: 1.75rem 1.25rem; }
    .hero h1 { font-size: 1.4rem; }
    .hero p { font-size: 0.85rem; }
    .hero::before, .hero::after { display: none; }

    /* Section layout */
    .section-header { padding: 1.5rem 1.25rem; }
    .section-header h1 { font-size: 1.35rem; }
    .section-body { padding: 1.25rem; }
    .section-nav { padding: 1.25rem; flex-direction: column; gap: 0.5rem; }

    /* Cards grid */
    .sections-grid { padding: 1rem; grid-template-columns: 1fr; gap: 0.75rem; }
    .section-card { padding: 1.15rem; }

    /* Stats */
    .stats-row { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
    .stat-card { flex: 1 1 calc(50% - 0.5rem); min-width: 0; padding: 0.75rem 0.5rem; }
    .stat-number { font-size: 1.4rem; }
    .stat-label { font-size: 0.65rem; }

    /* Tabs */
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; gap: 0; }
    .tab { padding: 0.6rem 0.85rem; font-size: 0.8rem; white-space: nowrap; }

    /* Toolbar / Filters */
    .board-toolbar {
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .filter-search { min-width: 0; flex: 1 1 100%; order: -1; }
    .filter-select { flex: 1 1 calc(50% - 0.2rem); font-size: 0.78rem; padding: 0.4rem 0.5rem; }
    .view-toggle { order: 10; }

    /* Kanban */
    .kanban { flex-direction: column; gap: 0.75rem; }
    .kanban-col { min-width: 100%; max-width: 100%; }
    .kanban-cards { max-height: none; }

    /* Tables */
    .table-wrapper { border-radius: 8px; }
    table { font-size: 0.8rem; }
    th, td { padding: 0.5rem 0.65rem; }
    th { font-size: 0.68rem; }

    /* Compare */
    .compare-grid { grid-template-columns: 1fr; }
    .compare-divider { width: 100%; height: 1px; }

    /* Architecture */
    .arch-grid { grid-template-columns: 1fr; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .modal { max-width: 95vw; border-radius: 12px; }
    .modal form { padding: 1rem 1.25rem; }
    .modal-header { padding: 1rem 1.25rem; }

    /* Feature detail */
    .fd-meta-grid { grid-template-columns: 1fr 1fr; gap: 0.5rem; padding: 0.75rem; }
    .fd-title { font-size: 1.1rem; }

    /* Activity */
    .activity-main { font-size: 0.82rem; }
    .activity-icon { width: 26px; height: 26px; font-size: 0.65rem; }

    /* Tech tags wrap */
    .tech-tag { font-size: 0.68rem; padding: 0.15rem 0.4rem; }
}

/* ===== RESPONSIVE — Small phones (max 480px) ===== */
@media (max-width: 480px) {
    .hero { padding: 1.5rem 1rem; }
    .hero h1 { font-size: 1.2rem; }
    .hero p { font-size: 0.82rem; }
    .section-header { padding: 1.25rem 1rem; }
    .section-header h1 { font-size: 1.15rem; }
    .section-body { padding: 1rem; }
    .sections-grid { padding: 0.75rem; }

    .stat-card { flex: 1 1 calc(50% - 0.35rem); }
    .stat-number { font-size: 1.2rem; }

    .tab { padding: 0.5rem 0.65rem; font-size: 0.75rem; }
    .tab i { display: none; }

    .kanban-card { padding: 0.55rem; }
    .kc-title { font-size: 0.8rem; }
    .kc-desc { display: none; }

    .btn { padding: 0.45rem 0.8rem; font-size: 0.78rem; }
    .btn-sm { padding: 0.35rem 0.6rem; font-size: 0.75rem; }

    .fd-meta-grid { grid-template-columns: 1fr; }

    /* Hide low-priority table columns */
    table th:nth-child(4), table td:nth-child(4),
    table th:nth-child(5), table td:nth-child(5) { display: none; }
}

/* ===== Print ===== */
@media print {
    .sidebar, .menu-toggle, .sidebar-collapse-btn, .board-toolbar,
    .btn, .modal-overlay, .tabs { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .hero { background: #fff !important; color: #000 !important; }
}
