:root {
    --font-sans: "Poppins", "Segoe UI", Arial, sans-serif;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --surface: #f6f9fc;
    --card: #fff;
    --border: #dbe5f0;
    --muted-border: #edf2f7;
    --text: #0f172a;
    --muted: #64748b;
    --soft-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

/* Mobile dashboard card proportions and readable type */
@media (max-width: 767px) {
    .dashboard-project-grid {
        align-items: stretch;
    }

    .dashboard-project-card {
        flex-basis: min(78vw, 19rem);
        width: min(78vw, 19rem);
        padding: 0.9rem !important;
    }

    .dashboard-project-head {
        margin-bottom: 0.7rem;
    }

    .dashboard-project-avatar {
        width: 2.25rem;
        height: 2.25rem;
        flex-basis: 2.25rem;
        font-size: 0.76rem;
    }

    .dashboard-project-head a {
        font-size: 0.86rem;
    }

    .dashboard-project-head .text-xs {
        font-size: 0.71rem;
    }

    .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.3rem;
        padding: 0.12rem 0.45rem;
        font-size: 0.64rem;
    }

    .dashboard-metric {
        min-height: 3rem;
        padding: 0.42rem 0.2rem;
    }

    .dashboard-metric .text-base {
        font-size: 0.92rem;
        line-height: 1.1;
    }

    .dashboard-metric .text-xs {
        margin-top: 0.2rem;
        font-size: 0.68rem;
        line-height: 1.1;
    }

    .dashboard-project-card .project-release-title {
        font-size: 0.64rem;
    }

    .dashboard-project-card .project-release-chip {
        min-height: 2.85rem;
    }

    .dashboard-project-card .project-release-chip span {
        font-size: 0.9rem;
    }

    .dashboard-project-card .project-release-chip small {
        font-size: 0.65rem;
    }

    .dashboard-mobile-2 .dashboard-project-grid {
        justify-items: center;
    }

    .dashboard-mobile-2 .dashboard-project-card {
        width: calc(100% - 1rem);
        max-width: 22rem;
        padding: 0.95rem !important;
    }

    .dashboard-mobile-2 .dashboard-project-head {
        margin-bottom: 0.72rem;
    }

    .dashboard-mobile-2 .dashboard-project-avatar {
        width: 2.3rem;
        height: 2.3rem;
        flex: 0 0 2.3rem;
        font-size: 0.76rem;
    }

    .dashboard-mobile-2 .dashboard-project-head a {
        font-size: 0.88rem;
    }

    .dashboard-mobile-2 .dashboard-project-head .text-xs {
        font-size: 0.71rem;
    }

    .dashboard-mobile-2 .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.28rem;
        padding: 0.12rem 0.45rem;
        font-size: 0.64rem;
    }

    .dashboard-mobile-2 .dashboard-metric {
        min-height: 3rem;
        padding: 0.42rem 0.1rem;
    }

    .dashboard-mobile-2 .dashboard-metric .text-base {
        font-size: 0.96rem;
        line-height: 1.1;
    }

    .dashboard-mobile-2 .dashboard-metric .text-xs {
        margin-top: 0.24rem;
        font-size: 0.68rem;
        line-height: 1.1;
    }

    .dashboard-mobile-2 .project-release-title {
        font-size: 0.63rem;
    }

    .dashboard-mobile-2 .project-release-chip {
        min-height: 2.8rem;
        padding: 0.35rem 0.1rem;
    }

    .dashboard-mobile-2 .project-release-chip span {
        font-size: 0.9rem;
        line-height: 1.1;
    }

    .dashboard-mobile-2 .project-release-chip small {
        margin-top: 0.2rem;
        font-size: 0.65rem;
        line-height: 1.1;
    }
}

* { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    font-family: var(--font-sans);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-sans);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }

body:has(form[action*="/login"]) {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 48%, #dbeafe 100%);
}

.sidebar {
    background: #fff;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 2.55rem;
    padding: 0.62rem 0.9rem;
    border-radius: 0.55rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.nav-link i {
    width: 1rem;
    color: #64748b;
    text-align: center;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-50);
    color: var(--primary-700);
}

.nav-link:hover i,
.nav-link.active i { color: var(--primary-600); }

.mobile-only-nav {
    display: none !important;
}

.card,
.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: var(--soft-shadow);
}

.screen-card-closed {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff 0%, #fff7f7 100%);
}

.screen-card-closed .font-semibold,
.screen-card-closed .text-slate-800 {
    color: #7f1d1d;
}

.release-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 5.75rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.release-stat:hover {
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
}

.release-stat-testing { background: linear-gradient(180deg, #fff 0%, #f8fbff 100%); }
.release-stat-uat { background: linear-gradient(180deg, #fff 0%, #fbf7ff 100%); }
.release-stat-staging { background: linear-gradient(180deg, #fff 0%, #fffbeb 100%); }

.project-release-panel {
    margin-top: 0.85rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--muted-border);
}

.project-release-title {
    margin-bottom: 0.5rem;
    color: #334155;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

.project-release-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 3.45rem;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.55rem;
    position: relative;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.project-release-chip:hover {
    border-color: #bfdbfe;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.project-release-chip i {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 0.55rem;
    font-size: 0.68rem;
}

.project-release-chip span {
    margin-top: 0.1rem;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
}

.project-release-chip small {
    margin-top: 0.25rem;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    text-align: center;
}

.project-release-testing { background: linear-gradient(180deg, #fff 0%, #eff6ff 100%); color: #2563eb; }
.project-release-testing i { background: #dbeafe; }
.project-release-uat { background: linear-gradient(180deg, #fff 0%, #faf5ff 100%); color: #9333ea; }
.project-release-uat i { background: #f3e8ff; }
.project-release-staging { background: linear-gradient(180deg, #fff 0%, #fffbeb 100%); color: #d97706; }
.project-release-staging i { background: #fef3c7; }

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 6.25rem;
    padding: 1.15rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.58rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

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

.btn-primary:hover {
    background: var(--primary-600);
    border-color: var(--primary-600);
}

.btn-secondary {
    background: #fff;
    border-color: var(--border);
    color: #334155;
}

.btn-secondary:hover { background: #f8fafc; }

.btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

.btn-sm {
    min-height: 2.1rem;
    padding: 0.42rem 0.75rem;
    font-size: 0.78rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 1.3rem;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    white-space: nowrap;
}

.form-label {
    display: block;
    margin-bottom: 0.35rem;
    color: #334155;
    font-size: 0.86rem;
    font-weight: 600;
}

.form-input,
.form-select,
textarea.form-input {
    display: block;
    width: 100%;
    min-height: 2.65rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.58rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.92rem;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.form-input:disabled,
.form-select:disabled {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    border-color: #cbd5e1;
    color: #475569;
    cursor: not-allowed;
    opacity: 1;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--primary-500);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

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

.screen-picker {
    position: relative;
    width: 100%;
}

.screen-picker-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 2.65rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.58rem;
    background: #fff;
    color: #0f172a;
    font-size: 0.92rem;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.screen-picker-button::after {
    content: "\f107";
    color: #475569;
    font-family: "Font Awesome 6 Free";
    font-size: 0.8rem;
    font-weight: 900;
}

.screen-picker-button:focus {
    border-color: var(--primary-500);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.screen-picker.is-disabled .screen-picker-button,
.screen-picker-button:disabled {
    background: linear-gradient(180deg, #f8fafc 0%, #eef3f8 100%);
    border-color: #cbd5e1;
    color: #475569;
    cursor: not-allowed;
    opacity: 1;
}

.screen-picker-type {
    margin-left: 0.25rem;
    color: #64748b;
    font-weight: 800;
    white-space: nowrap;
}

.screen-picker-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 60;
    max-height: 14rem;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 0.6rem;
    background: #fff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
}

.screen-picker-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 0.62rem 0.75rem;
    border: 0;
    background: #fff;
    color: #0f172a;
    font-size: 0.9rem;
    text-align: left;
}

.screen-picker-option:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.screen-picker-option strong {
    margin-left: 0.25rem;
    color: #64748b;
    font-weight: 800;
    white-space: nowrap;
}

.table-header {
    padding: 0.8rem 1rem;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.table-cell {
    padding: 0.85rem 1rem;
    color: #334155;
    font-size: 0.88rem;
    vertical-align: middle;
}

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

tbody tr { transition: background-color 0.16s ease; }
tbody tr:hover { background: #f8fafc; }

main { width: 100%; }
header { min-height: 3.5rem; }

.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { inset: 0; }
.top-0 { top: 0; }
.left-3 { left: 0.75rem; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-10 { z-index: 10; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.min-h-screen { min-height: 100vh; }

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-5 > * + * { margin-top: 1.25rem; }

.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-64 { width: 16rem; }
.max-w-xs { max-width: 20rem; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-20 { max-width: 5rem; }
.h-4 { height: 1rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-40 { height: 10rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.p-16 { padding: 4rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-2\.5 { padding-left: 0.625rem; padding-right: 0.625rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-3 { padding-right: 0.75rem; }
.pt-3 { padding-top: 0.75rem; }
.pt-6 { padding-top: 1.5rem; }
.pb-1 { padding-bottom: 0.25rem; }

.m-auto { margin: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.ml-auto { margin-left: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mr-1 { margin-right: 0.25rem; }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }
.object-cover { object-fit: cover; }
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.whitespace-nowrap { white-space: nowrap; }
.whitespace-pre-line { white-space: pre-line; }
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rounded-full { border-radius: 999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.border { border: 1px solid var(--border); }
.border-2 { border-width: 2px; }
.border-dashed { border-style: dashed; }
.border-b { border-bottom: 1px solid var(--muted-border); }
.border-t { border-top: 1px solid var(--muted-border); }
.border-r { border-right: 1px solid var(--border); }
.border-l-2 { border-left: 2px solid; }
.border-slate-100 { border-color: #f1f5f9; }
.border-slate-200 { border-color: #e2e8f0; }
.border-red-200 { border-color: #fecaca; }
.border-green-200 { border-color: #bbf7d0; }
.border-red-400 { border-color: #f87171; }

.shadow-sm { box-shadow: var(--soft-shadow); }
.shadow-lg { box-shadow: 0 12px 30px rgba(59, 130, 246, 0.18); }
.transition { transition: all 0.16s ease; }
.transition-all { transition: all 0.16s ease; }
.transition-shadow { transition: box-shadow 0.16s ease; }
.hover\:shadow-md:hover { box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1); }

.bg-white { background: #fff; }
.bg-slate-50 { background: #f8fafc; }
.bg-slate-100 { background: #f1f5f9; }
.bg-blue-50 { background: #eff6ff; }
.bg-blue-100 { background: #dbeafe; }
.bg-blue-500 { background: #3b82f6; }
.bg-red-50 { background: #fef2f2; }
.bg-red-100 { background: #fee2e2; }
.bg-red-500 { background: #ef4444; }
.bg-orange-100 { background: #ffedd5; }
.bg-amber-50 { background: #fffbeb; }
.bg-amber-100 { background: #fef3c7; }
.bg-yellow-100 { background: #fef9c3; }
.bg-green-50 { background: #f0fdf4; }
.bg-green-100 { background: #dcfce7; }
.bg-purple-50 { background: #faf5ff; }
.bg-purple-100 { background: #f3e8ff; }
.bg-primary-50 { background: var(--primary-50); }
.bg-primary-100 { background: var(--primary-100); }
.bg-primary-500 { background: var(--primary-500); }
.bg-black\/40 { background: rgba(0, 0, 0, 0.4); }
.hover\:bg-slate-50:hover { background: #f8fafc; }
.hover\:bg-red-100:hover { background: #fee2e2; }
.hover\:bg-amber-100:hover { background: #fef3c7; }
.hover\:bg-purple-100:hover { background: #f3e8ff; }
.hover\:bg-green-100:hover { background: #dcfce7; }
.hover\:bg-blue-100:hover { background: #dbeafe; }
.hover\:opacity-90:hover { opacity: 0.9; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-wider { letter-spacing: 0.04em; }
.leading-tight { line-height: 1.2; }

.text-white { color: #fff; }
.text-slate-300 { color: #cbd5e1; }
.text-slate-400 { color: #94a3b8; }
.text-slate-500 { color: #64748b; }
.text-slate-600 { color: #475569; }
.text-slate-700 { color: #334155; }
.text-slate-800 { color: #1e293b; }
.text-slate-900 { color: #0f172a; }
.text-primary-500 { color: var(--primary-500); }
.text-primary-600 { color: var(--primary-600); }
.text-primary-700 { color: var(--primary-700); }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-red-700 { color: #b91c1c; }
.text-red-800 { color: #991b1b; }
.text-orange-700 { color: #c2410c; }
.text-amber-600 { color: #d97706; }
.text-yellow-700 { color: #a16207; }
.text-yellow-800 { color: #854d0e; }
.text-green-400 { color: #4ade80; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-green-800 { color: #166534; }
.text-purple-600 { color: #9333ea; }
.text-purple-700 { color: #7e22ce; }
.hover\:text-primary-500:hover { color: var(--primary-500); }
.hover\:text-primary-600:hover { color: var(--primary-600); }
.hover\:text-blue-500:hover { color: #3b82f6; }
.hover\:text-green-500:hover { color: #22c55e; }
.hover\:text-red-500:hover { color: #ef4444; }
.hover\:text-slate-700:hover { color: #334155; }
.hover\:underline:hover { text-decoration: underline; }

.divide-y > * + * { border-top: 1px solid var(--muted-border); }
.divide-slate-50 > * + * { border-color: #f8fafc; }

input[type="checkbox"],
input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary-500);
}

.cursor-pointer { cursor: pointer; }

.locked-fields-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f8fafc 0%, #eef3f8 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:inline { display: inline; }
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
    .md\:p-6 { padding: 1.5rem; }
    .md\:p-8 { padding: 2rem; }
    .md\:mx-6 { margin-left: 1.5rem; margin-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
    body.app-shell { display: block; }

    #sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(18rem, 86vw);
        min-height: 100vh;
        transform: translateX(-100%);
        box-shadow: 18px 0 40px rgba(15, 23, 42, 0.18);
    }

    #sidebar.open { transform: translateX(0); }
    .md\:hidden { display: block; }

    header {
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
    }

    header .btn {
        min-height: 2.25rem;
        padding: 0.46rem 0.65rem;
        font-size: 0.8rem;
    }

    main { padding: 1rem; }

    .stat-card {
        align-items: flex-start;
        min-height: 7rem;
        padding: 1rem;
        flex-direction: column;
        gap: 0.65rem;
    }

    .dashboard-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 0.5rem !important;
        margin-bottom: 1.25rem;
    }

    .dashboard-stats .stat-card {
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 6.25rem;
        padding: 0.65rem 0.3rem;
        gap: 0.4rem;
        text-align: center;
    }

    .dashboard-stats .stat-card > div:first-child {
        width: 2rem;
        height: 2rem;
        border-radius: 0.6rem;
        flex: 0 0 2rem;
    }

    .dashboard-stats .stat-card > div:first-child i {
        font-size: 0.78rem;
    }

    .dashboard-stats .stat-card .text-2xl {
        font-size: 1.2rem;
        line-height: 1.1;
    }

    .dashboard-stats .stat-card .text-xs {
        display: block;
        margin-top: 0.18rem;
        font-size: 0.66rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .card { border-radius: 0.65rem; }
    .p-12, .p-16 { padding: 2rem 1rem; }
    .p-8 { padding: 1.5rem; }
    .px-5 { padding-left: 1rem; padding-right: 1rem; }

    .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

    .locked-fields-panel {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    form.flex.flex-wrap > div {
        min-width: min(100%, 13rem);
        flex: 1 1 13rem;
    }

    .btn {
        min-width: 0;
        white-space: normal;
    }

    .table-header,
    .table-cell {
        padding: 0.75rem;
        font-size: 0.8rem;
    }

    .overflow-x-auto { -webkit-overflow-scrolling: touch; }
}

.permission-group {
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: #fff;
    font-family: inherit;
}

.permission-group-title {
    margin-bottom: 0.65rem;
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
}

.permission-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem;
    border-radius: 0.5rem;
    color: #475569;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.25;
}

.permission-check:hover {
    background: #f8fafc;
}

.role-create-form {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) auto;
    align-items: end;
    gap: 0.85rem;
    font-family: inherit;
}

.role-permission-compact {
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    overflow: hidden;
}

.role-editor-panel {
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    background: #fff;
    font-family: inherit;
}

.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
}

.status-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #334155;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-switch i {
    position: relative;
    display: inline-block;
    width: 2.35rem;
    height: 1.25rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.16s ease;
}

.status-switch i::after {
    content: "";
    position: absolute;
    top: 0.18rem;
    left: 0.18rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
    transition: transform 0.16s ease;
}

.status-switch input:checked + i {
    background: #22c55e;
}

.status-switch input:checked + i::after {
    transform: translateX(1.08rem);
}

.status-switch.readonly {
    pointer-events: none;
}

.status-switch.readonly i {
    opacity: 0.9;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.confirm-modal {
    width: min(100%, 26rem);
    padding: 1.35rem;
    border: 1px solid #dbe5f0;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    font-family: inherit;
}

.confirm-modal-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.85rem;
    border-radius: 0.75rem;
    background: var(--primary-50);
    color: var(--primary-600);
}

.confirm-modal h2 {
    margin: 0;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
}

.confirm-modal p {
    margin: 0.5rem 0 1rem;
    color: #475569;
    font-size: 0.9rem;
}

.confirm-status-message {
    margin-top: 0;
    color: #0f172a;
    font-size: 0.92rem;
    font-weight: 700;
}

.status-word-active,
.status-word-inactive {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

.status-word-active {
    background: #dcfce7;
    color: #15803d;
}

.status-word-inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.role-view-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: var(--soft-shadow);
    font-family: inherit;
}

.role-view-status {
    justify-self: center;
}

.role-view-meta {
    justify-self: end;
    text-align: right;
}

.role-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.75rem;
    background: var(--primary-500);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
}

.role-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--primary-700);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.role-list-title {
    color: #1e293b;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
}

.role-list-subtitle {
    margin-top: 0.15rem;
    color: #64748b;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
}

.role-list-meta-main {
    color: #334155;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.25;
}

.role-list-meta-sub {
    margin-top: 0.15rem;
    color: #64748b;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
}

.role-view-title {
    margin: 0;
    color: #1e293b;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
}

.role-view-subtitle {
    margin: 0.15rem 0 0;
    color: #64748b;
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.3;
}

.role-view-meta-label,
.role-view-meta-date {
    color: #64748b;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 500;
    line-height: 1.25;
}

.role-view-meta-name {
    margin-top: 0.18rem;
    color: #1e293b;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.25;
}

.role-view-meta-date {
    margin-top: 0.28rem;
}

.role-screen-card {
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: var(--soft-shadow);
    font-family: inherit;
}

.role-screen-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.role-screen-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 0.7rem;
    background: var(--primary-50);
    color: var(--primary-600);
}

.role-screen-head h3 {
    margin: 0;
    color: #1e293b;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.25;
}

.role-screen-head p {
    margin: 0.1rem 0 0;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 500;
}

.role-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.role-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.72rem;
    padding: 0.28rem 0.58rem;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
}

.role-action-pill.enabled {
    background: #f1f5f9;
    color: #334155;
}

.role-action-pill.disabled {
    background: #f1f5f9;
    color: #94a3b8;
}

@media (max-width: 767px) {
    .role-view-header {
        align-items: flex-start;
        grid-template-columns: 1fr;
    }

    .role-view-status,
    .role-view-meta {
        justify-self: start;
        text-align: left;
    }
}

.role-permission-row {
    display: grid;
    grid-template-columns: 7rem 1fr;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--muted-border);
    font-family: inherit;
}

.role-permission-row:last-child {
    border-bottom: 0;
}

.role-permission-title {
    color: #334155;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
}

.role-permission-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.permission-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.7rem;
    padding: 0.26rem 0.55rem;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.15;
}

.permission-chip input {
    width: 0.82rem;
    height: 0.82rem;
}

@media (max-width: 767px) {
    .role-create-form,
    .role-permission-row {
        grid-template-columns: 1fr;
    }
}

/* Dashboard visual refresh */
body.app-shell {
    background:
        radial-gradient(circle at 82% 8%, rgba(59, 130, 246, 0.07), transparent 24rem),
        #f5f8fc;
}

body.app-shell > .flex-1 > header {
    background: rgba(255, 255, 255, 0.9);
    border-color: #e6edf5;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    backdrop-filter: blur(12px);
}

.sidebar {
    border-color: #e6edf5;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.025);
}

.nav-link {
    border: 1px solid transparent;
    border-radius: 0.7rem;
}

.nav-link:hover {
    background: #f5f8ff;
    border-color: #e3ecfb;
}

.nav-link.active {
    background: linear-gradient(135deg, #eff6ff, #e8f1ff);
    border-color: #dce9fd;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
}

.dashboard-stats {
    gap: 1rem;
}

.dashboard-stats .stat-card {
    position: relative;
    min-height: 6.4rem;
    overflow: hidden;
    border-color: #e2eaf3;
    border-radius: 1rem;
    box-shadow: 0 10px 28px rgba(30, 64, 175, 0.055);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-stats .stat-card::after {
    content: "";
    position: absolute;
    inset: auto -1.5rem -2rem auto;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.035;
}

.dashboard-stats .stat-card:hover {
    border-color: #cbdcf2;
    box-shadow: 0 14px 34px rgba(30, 64, 175, 0.09);
    transform: translateY(-2px);
}

.dashboard-stats .stat-card > div:first-child {
    border-radius: 0.85rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.dashboard-stats .stat-card .text-2xl {
    color: #172033;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.025em;
}

.dashboard-stats .stat-card .text-xs {
    color: #607089;
    font-weight: 400;
}

.dashboard-section-header h2 {
    color: #172033;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.dashboard-project-card {
    position: relative;
    overflow: hidden;
    border-color: #e0e9f2;
    border-radius: 1rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.055);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-project-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), #8b5cf6, transparent 78%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.dashboard-project-card:hover {
    border-color: #cbdcf2;
    box-shadow: 0 16px 38px rgba(30, 64, 175, 0.09);
    transform: translateY(-3px);
}

.dashboard-project-card:hover::before {
    opacity: 1;
}

.dashboard-project-avatar {
    border-radius: 0.85rem;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.13);
}

.dashboard-project-head a {
    color: #172033;
    font-weight: 600;
}

.dashboard-project-card > .dashboard-project-head > .badge {
    min-height: 1.35rem;
    padding-inline: 0.58rem;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.005em;
}

.dashboard-project-metrics {
    gap: 0.5rem;
}

.dashboard-metric {
    min-height: 3.45rem;
    border: 1px solid rgba(148, 163, 184, 0.09);
    border-radius: 0.72rem;
    transition: transform 0.16s ease, filter 0.16s ease;
}

.dashboard-metric:hover {
    filter: saturate(1.08);
    transform: translateY(-1px);
}

.dashboard-metric .font-bold {
    font-weight: 600;
}

.dashboard-metric .text-xs {
    color: #65758b;
    font-weight: 400;
}

.dashboard-project-card .project-release-panel {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-color: #edf2f7;
}

.dashboard-project-card .project-release-title {
    margin-bottom: 0.55rem;
    color: #748198;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.dashboard-project-card .project-release-chip {
    min-height: 3.55rem;
    border-color: #e2e9f2;
    border-radius: 0.72rem;
    box-shadow: none;
}

.dashboard-project-card .project-release-chip:hover {
    border-color: #cbd8e8;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
    transform: translateY(-1px);
}

.dashboard-project-card .project-release-chip span {
    font-weight: 600;
}

.dashboard-project-card .project-release-chip small {
    color: #65758b;
    font-weight: 500;
}

.dashboard-activity-card {
    overflow: hidden;
    border-color: #e0e9f2;
    border-radius: 1rem;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.05);
}

.dashboard-activity-card > div:first-child {
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.dashboard-activity-card h3 {
    color: #172033;
    font-weight: 600;
}

.dashboard-activity-row {
    transition: background-color 0.16s ease;
}

.dashboard-activity-row:hover {
    background: #f8fbff;
}

.dashboard-activity-row .badge {
    font-weight: 600;
}

@media (max-width: 767px) {
    body.app-shell {
        background: #f5f8fc;
    }

    .dashboard-stats .stat-card {
        min-height: 5.8rem;
        border-radius: 0.8rem;
        box-shadow: 0 6px 18px rgba(30, 64, 175, 0.05);
    }

    .dashboard-stats .stat-card:hover,
    .dashboard-project-card:hover {
        transform: none;
    }

    .dashboard-project-card,
    .dashboard-activity-card {
        border-radius: 0.85rem;
    }
}

/* Reference-inspired dashboard system */
.dashboard-welcome {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 8.75rem;
    margin-bottom: 1.5rem;
    padding: 1.65rem 2rem;
    overflow: hidden;
    border: 1px solid #e8eaf2;
    border-radius: 0.75rem;
    background:
        radial-gradient(circle at 78% 15%, rgba(99, 102, 241, 0.12), transparent 14rem),
        #fff;
    box-shadow: 0 4px 14px rgba(20, 27, 45, 0.055);
}

.dashboard-eyebrow {
    display: block;
    margin-bottom: 0.45rem;
    color: #6366f1;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.095em;
    text-transform: uppercase;
}

.dashboard-welcome h2 {
    margin: 0;
    color: #292b34;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.015em;
}

.dashboard-welcome p {
    max-width: 34rem;
    margin: 0.45rem 0 0;
    color: #818590;
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.5;
}

.dashboard-welcome-art {
    position: relative;
    display: grid;
    place-items: center;
    width: 7rem;
    height: 5.5rem;
    margin-right: 2rem;
    color: #6366f1;
}

.dashboard-welcome-art::before,
.dashboard-welcome-art::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: #eef0ff;
}

.dashboard-welcome-art::before {
    width: 5.25rem;
    height: 5.25rem;
}

.dashboard-welcome-art::after {
    right: -1.5rem;
    bottom: -1.5rem;
    width: 3rem;
    height: 3rem;
    opacity: 0.65;
}

.dashboard-welcome-art span {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 3.15rem;
    height: 3.15rem;
    border-radius: 1rem;
    background: #6366f1;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 10px 22px rgba(99, 102, 241, 0.22);
}

.dashboard-welcome-art > i {
    position: absolute;
    z-index: 2;
    right: 0.45rem;
    bottom: 0.25rem;
    color: #22c55e;
    font-size: 1.15rem;
    filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.12));
}

.dashboard-stats .stat-card {
    min-height: 5.8rem;
    padding: 1.15rem 1.25rem;
    border: 0;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 27, 45, 0.06);
}

.dashboard-stats .stat-card::after {
    display: none;
}

.dashboard-stats .stat-card > div:first-child {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.65rem;
    box-shadow: none;
}

.dashboard-stats .stat-card .text-2xl {
    color: #30333c;
    font-size: 1.35rem;
    font-weight: 600;
}

.dashboard-stats .stat-card .text-xs {
    margin-top: 0.12rem;
    color: #8a8e98;
    font-size: 0.75rem;
    font-weight: 400;
}

.dashboard-section-header {
    margin-top: 0.25rem;
}

.dashboard-section-header h2 {
    color: #30333c;
    font-size: 1rem;
    font-weight: 600;
}

.dashboard-project-card {
    border: 0;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 27, 45, 0.06);
}

.dashboard-project-card::before {
    display: none;
}

.dashboard-project-card:hover {
    border-color: transparent;
    box-shadow: 0 9px 24px rgba(20, 27, 45, 0.09);
    transform: translateY(-2px);
}

.dashboard-project-avatar {
    border-radius: 0.65rem;
    box-shadow: none;
}

.dashboard-project-head a {
    color: #30333c;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-project-head .text-xs {
    color: #9296a0;
    font-size: 0.73rem;
}

.dashboard-project-card > .dashboard-project-head > .badge,
.dashboard-activity-row .badge {
    min-height: 1.25rem;
    padding: 0.15rem 0.48rem;
    font-size: 0.64rem;
    font-weight: 500;
    letter-spacing: 0;
}

.dashboard-metric {
    min-height: 3.3rem;
    padding: 0.5rem;
    border: 0;
    border-radius: 0.55rem;
}

.dashboard-metric .text-base {
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-metric .text-xs {
    margin-top: 0.12rem;
    color: #858a95;
    font-size: 0.68rem;
}

.dashboard-project-card .project-release-panel {
    border-color: #eff0f4;
}

.dashboard-project-card .project-release-title {
    color: #969aa4;
    font-size: 0.63rem;
    font-weight: 600;
    letter-spacing: 0.085em;
}

.dashboard-project-card .project-release-chip {
    min-height: 3.35rem;
    border: 1px solid #eceef3;
    border-radius: 0.55rem;
    background: #fafbfc;
}

.dashboard-project-card .project-release-chip:hover {
    border-color: #dfe2ea;
    background: #f7f8fb;
    box-shadow: none;
}

.dashboard-project-card .project-release-chip span {
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-project-card .project-release-chip small {
    color: #8a8e98;
    font-size: 0.63rem;
    font-weight: 500;
}

.dashboard-activity-card {
    border: 0;
    border-radius: 0.65rem;
    box-shadow: 0 4px 14px rgba(20, 27, 45, 0.06);
}

.dashboard-activity-card > div:first-child {
    background: #fff;
}

.dashboard-activity-card h3 {
    color: #30333c;
    font-size: 0.9rem;
    font-weight: 600;
}

.dashboard-activity-card > div:first-child a {
    color: #6366f1;
    font-weight: 500;
}

.dashboard-activity-row {
    min-height: 3.8rem;
}

.dashboard-activity-row:hover {
    background: #fafbfe;
}

.dashboard-activity-row a.text-sm {
    color: #3a3d46;
    font-size: 0.82rem;
    font-weight: 500;
}

.dashboard-activity-row .text-xs {
    color: #9397a1;
    font-size: 0.7rem;
}

@media (max-width: 767px) {
    .dashboard-welcome {
        min-height: auto;
        margin-bottom: 1rem;
        padding: 1.15rem;
        border-radius: 0.65rem;
    }

    .dashboard-welcome h2 {
        font-size: 1.1rem;
    }

    .dashboard-welcome p {
        font-size: 0.78rem;
    }

    .dashboard-welcome-art {
        display: none;
    }

    .dashboard-stats .stat-card {
        min-height: 5.2rem;
        padding: 0.55rem 0.2rem;
        border-radius: 0.55rem;
    }

    .dashboard-stats .stat-card > div:first-child {
        width: 1.85rem;
        height: 1.85rem;
        flex-basis: 1.85rem;
    }

    .dashboard-stats .stat-card .text-2xl {
        font-size: 1.05rem;
    }

    .dashboard-stats .stat-card .text-xs {
        font-size: 0.61rem;
    }
}

/* Compact, fluid dashboard sizing */
html {
    font-size: clamp(14px, calc(12px + 0.18vw), 15.5px);
}

body,
button,
input,
select,
textarea {
    font-family: var(--font-sans);
}

.text-xs {
    font-size: clamp(0.66rem, calc(0.62rem + 0.1vw), 0.75rem);
}

.text-sm {
    font-size: clamp(0.76rem, calc(0.71rem + 0.12vw), 0.875rem);
}

.text-base {
    font-size: clamp(0.88rem, calc(0.82rem + 0.13vw), 1rem);
}

.text-lg {
    font-size: clamp(1rem, calc(0.92rem + 0.16vw), 1.125rem);
}

.text-xl {
    font-size: clamp(1.1rem, calc(1rem + 0.2vw), 1.25rem);
}

.text-2xl {
    font-size: clamp(1.25rem, calc(1.08rem + 0.3vw), 1.5rem);
}

.badge {
    min-height: 1.2rem;
    padding: 0.12rem 0.45rem;
    font-size: clamp(0.6rem, calc(0.56rem + 0.08vw), 0.67rem);
    font-weight: 600;
    line-height: 1.15;
}

.dashboard-stats {
    gap: clamp(0.65rem, 1vw, 1rem);
    margin-bottom: 1.35rem;
}

.dashboard-stats .stat-card {
    min-height: 5rem;
    padding: 0.8rem 0.95rem;
    gap: 0.75rem;
}

.dashboard-stats .stat-card > div:first-child {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
}

.dashboard-stats .stat-card > div:first-child i {
    font-size: 0.78rem;
}

.dashboard-stats .stat-card .text-2xl {
    font-size: clamp(1.1rem, calc(1rem + 0.2vw), 1.3rem);
    font-weight: 600;
}

.dashboard-stats .stat-card .text-xs {
    font-size: clamp(0.62rem, calc(0.58rem + 0.09vw), 0.7rem);
    white-space: nowrap;
}

.dashboard-project-grid {
    gap: clamp(0.7rem, 1vw, 1rem);
}

.dashboard-project-card {
    padding: clamp(0.85rem, 1vw, 1rem) !important;
}

.dashboard-project-head {
    margin-bottom: 0.7rem;
}

.dashboard-project-avatar {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.72rem;
}

.dashboard-project-head a {
    font-size: clamp(0.76rem, calc(0.72rem + 0.08vw), 0.84rem);
    line-height: 1.25;
}

.dashboard-project-head .text-xs {
    font-size: clamp(0.61rem, calc(0.58rem + 0.06vw), 0.67rem);
}

.dashboard-project-card > .dashboard-project-head > .badge {
    min-height: 1.15rem;
    padding: 0.1rem 0.42rem;
    font-size: clamp(0.58rem, calc(0.55rem + 0.06vw), 0.63rem);
    font-weight: 600;
}

.dashboard-project-metrics {
    gap: 0.4rem;
}

.dashboard-metric {
    min-height: 2.8rem;
    padding: 0.35rem 0.25rem;
}

.dashboard-metric .text-base {
    font-size: clamp(0.78rem, calc(0.73rem + 0.1vw), 0.87rem);
}

.dashboard-metric .text-xs {
    font-size: clamp(0.57rem, calc(0.54rem + 0.06vw), 0.63rem);
}

.dashboard-project-card .project-release-panel {
    margin-top: 0.65rem;
    padding-top: 0.58rem;
}

.dashboard-project-card .project-release-title {
    margin-bottom: 0.4rem;
    font-size: clamp(0.56rem, calc(0.53rem + 0.05vw), 0.61rem);
}

.dashboard-project-card .project-release-chip {
    min-height: 2.9rem;
    padding: 0.34rem;
}

.dashboard-project-card .project-release-chip i {
    top: 0.35rem;
    left: 0.35rem;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.56rem;
}

.dashboard-project-card .project-release-chip span {
    font-size: clamp(0.76rem, calc(0.71rem + 0.1vw), 0.86rem);
}

.dashboard-project-card .project-release-chip small {
    margin-top: 0.15rem;
    font-size: clamp(0.55rem, calc(0.52rem + 0.05vw), 0.6rem);
}

.dashboard-activity {
    gap: clamp(0.8rem, 1.2vw, 1.25rem);
}

.dashboard-activity-card > div:first-child {
    padding: 0.85rem 1rem;
}

.dashboard-activity-row {
    min-height: 3.25rem;
    padding: 0.65rem 1rem;
}

@media (min-width: 1380px) {
    .dashboard-project-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .dashboard-stats {
        gap: 0.42rem !important;
    }

    .dashboard-stats .stat-card {
        min-height: 4.65rem;
        padding: 0.45rem 0.15rem;
        gap: 0.3rem;
    }

    .dashboard-stats .stat-card > div:first-child {
        width: 1.7rem;
        height: 1.7rem;
        flex-basis: 1.7rem;
    }

    .dashboard-stats .stat-card .text-2xl {
        font-size: 0.95rem;
    }

    .dashboard-stats .stat-card .text-xs {
        font-size: 0.56rem;
        white-space: normal;
    }

    .dashboard-project-card {
        padding: 0.85rem !important;
    }
}

/* Mobile dashboard density — desktop remains unchanged */
@media (max-width: 767px) {
    .mobile-only-nav {
        display: flex !important;
    }

    .dashboard-stats .stat-card {
        min-height: 4.35rem;
        padding: 0.4rem 0.15rem;
    }

    .dashboard-stats .stat-card > div:first-child {
        width: 1.8rem;
        height: 1.8rem;
        flex-basis: 1.8rem;
    }

    .dashboard-stats .stat-card .text-2xl {
        font-size: 1rem;
    }

    .dashboard-stats .stat-card .text-xs {
        font-size: 0.62rem;
        line-height: 1.12;
    }

    .dashboard-projects {
        margin-right: -1rem;
    }

    .dashboard-section-header {
        margin-right: 1rem;
        margin-bottom: 0.75rem;
    }

    .dashboard-project-grid {
        display: flex !important;
        gap: 0.7rem;
        padding: 0 1rem 0.3rem 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-padding-left: 0;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .dashboard-project-grid::-webkit-scrollbar {
        display: none;
    }

    .dashboard-project-card {
        flex: 0 0 min(82vw, 20rem);
        width: min(82vw, 20rem);
        padding: 0.75rem !important;
        scroll-snap-align: start;
    }

    .dashboard-project-head {
        margin-bottom: 0.55rem;
    }

    .dashboard-project-avatar {
        width: 2rem;
        height: 2rem;
    }

    .dashboard-project-head a {
        font-size: 0.8rem;
    }

    .dashboard-project-head .text-xs {
        font-size: 0.68rem;
    }

    .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.2rem;
        font-size: 0.62rem;
    }

    .dashboard-project-metrics {
        gap: 0.35rem;
    }

    .dashboard-metric {
        min-height: 2.55rem;
        padding: 0.28rem 0.15rem;
    }

    .dashboard-metric .text-base {
        font-size: 0.82rem;
    }

    .dashboard-metric .text-xs {
        font-size: 0.63rem;
    }

    .dashboard-project-card .project-release-panel {
        margin-top: 0.5rem;
        padding-top: 0.45rem;
    }

    .dashboard-project-card .project-release-title {
        margin-bottom: 0.32rem;
        font-size: 0.59rem;
    }

    .dashboard-project-card .project-release-chip {
        min-height: 2.55rem;
        padding: 0.25rem;
    }

    .dashboard-project-card .project-release-chip i {
        top: 0.28rem;
        left: 0.28rem;
        width: 1.05rem;
        height: 1.05rem;
    }

    .dashboard-project-card .project-release-chip span {
        font-size: 0.8rem;
    }

    .dashboard-project-card .project-release-chip small {
        font-size: 0.59rem;
    }

    .dashboard-mobile-2 .dashboard-projects {
        margin-right: 0;
    }

    .dashboard-mobile-2 .dashboard-section-header {
        margin-right: 0;
    }

    .dashboard-mobile-2 .dashboard-project-grid {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0.7rem;
        width: 100%;
        padding: 0 0 0.3rem;
        overflow: visible;
        scroll-snap-type: none;
    }

    .dashboard-mobile-2 .dashboard-project-card {
        width: 100%;
        max-width: none;
        flex: none;
        scroll-snap-align: none;
    }

    .dashboard-mobile-2 .dashboard-project-grid {
        gap: 0.55rem;
    }

    .dashboard-mobile-2 .dashboard-project-card {
        padding: 0.7rem !important;
        border: 1px solid #edf0f5;
        border-radius: 0.7rem;
        box-shadow: 0 3px 10px rgba(25, 35, 55, 0.055);
    }

    .dashboard-mobile-2 .dashboard-project-head {
        margin-bottom: 0.5rem;
    }

    .dashboard-mobile-2 .dashboard-project-avatar {
        width: 2rem;
        height: 2rem;
        flex: 0 0 2rem;
        border-radius: 0.58rem;
        font-size: 0.68rem;
    }

    .dashboard-mobile-2 .dashboard-project-head a {
        font-size: 0.77rem;
        font-weight: 600;
    }

    .dashboard-mobile-2 .dashboard-project-head .text-xs {
        font-size: 0.64rem;
    }

    .dashboard-mobile-2 .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.1rem;
        padding: 0.08rem 0.38rem;
        font-size: 0.57rem;
    }

    .dashboard-mobile-2 .dashboard-project-metrics {
        gap: 0;
        padding: 0.32rem 0.15rem;
        border: 1px solid #eef1f5;
        border-radius: 0.55rem;
        background: #fafbfc;
    }

    .dashboard-mobile-2 .dashboard-metric {
        position: relative;
        min-height: 2.15rem;
        padding: 0.18rem 0.1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .dashboard-mobile-2 .dashboard-metric:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 0.2rem;
        right: 0;
        bottom: 0.2rem;
        width: 1px;
        background: #e8ebf0;
    }

    .dashboard-mobile-2 .dashboard-metric:hover {
        background: transparent;
        filter: none;
        transform: none;
    }

    .dashboard-mobile-2 .dashboard-metric .text-base {
        font-size: 0.78rem;
        line-height: 1.05;
    }

    .dashboard-mobile-2 .dashboard-metric .text-xs {
        margin-top: 0.18rem;
        font-size: 0.59rem;
        line-height: 1;
    }

    .dashboard-mobile-2 .project-release-panel {
        margin-top: 0.42rem;
        padding-top: 0.38rem;
    }

    .dashboard-mobile-2 .project-release-title {
        margin-bottom: 0.25rem;
        font-size: 0.54rem;
        letter-spacing: 0.075em;
    }

    .dashboard-mobile-2 .project-release-panel .grid {
        gap: 0;
        padding: 0.28rem 0.15rem;
        border: 1px solid #eef1f5;
        border-radius: 0.55rem;
        background: #fafbfc;
    }

    .dashboard-mobile-2 .project-release-chip {
        min-height: 2.1rem;
        padding: 0.15rem 0.1rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .dashboard-mobile-2 .project-release-chip:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 0.18rem;
        right: 0;
        bottom: 0.18rem;
        width: 1px;
        background: #e8ebf0;
    }

    .dashboard-mobile-2 .project-release-chip:hover {
        border: 0;
        background: transparent;
        box-shadow: none;
        transform: none;
    }

    .dashboard-mobile-2 .project-release-chip i {
        top: 50%;
        left: 0.22rem;
        width: 1rem;
        height: 1rem;
        font-size: 0.5rem;
        transform: translateY(-50%);
    }

    .dashboard-mobile-2 .project-release-chip span {
        margin-top: 0;
        font-size: 0.72rem;
        line-height: 1;
    }

    .dashboard-mobile-2 .project-release-chip small {
        margin-top: 0.16rem;
        font-size: 0.56rem;
        line-height: 1;
    }
}

/* Final mobile-only sizing overrides */
@media (max-width: 767px) {
    .dashboard-project-card {
        flex-basis: min(78vw, 19rem);
        width: min(78vw, 19rem);
        padding: 0.9rem !important;
    }

    .dashboard-project-head a { font-size: 0.86rem; }
    .dashboard-project-head .text-xs { font-size: 0.71rem; }

    .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.3rem;
        font-size: 0.64rem;
    }

    .dashboard-metric {
        min-height: 3rem;
        padding-block: 0.42rem;
    }

    .dashboard-metric .text-base { font-size: 0.92rem; }
    .dashboard-metric .text-xs { font-size: 0.68rem; }
    .dashboard-project-card .project-release-chip { min-height: 2.85rem; }
    .dashboard-project-card .project-release-chip span { font-size: 0.9rem; }
    .dashboard-project-card .project-release-chip small { font-size: 0.65rem; }

    .dashboard-mobile-2 .dashboard-project-grid {
        justify-items: center;
    }

    .dashboard-mobile-2 .dashboard-project-card {
        width: calc(100% - 1rem);
        max-width: 22rem;
        padding: 0.95rem !important;
    }

    .dashboard-mobile-2 .dashboard-project-avatar {
        width: 2.3rem;
        height: 2.3rem;
        flex-basis: 2.3rem;
    }

    .dashboard-mobile-2 .dashboard-project-head a { font-size: 0.88rem; }
    .dashboard-mobile-2 .dashboard-project-head .text-xs { font-size: 0.71rem; }

    .dashboard-mobile-2 .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.28rem;
        font-size: 0.64rem;
    }

    .dashboard-mobile-2 .dashboard-metric {
        min-height: 3rem;
        padding-block: 0.42rem;
    }

    .dashboard-mobile-2 .dashboard-metric .text-base {
        font-size: 0.96rem;
    }

    .dashboard-mobile-2 .dashboard-metric .text-xs {
        font-size: 0.68rem;
    }

    .dashboard-mobile-2 .project-release-chip {
        min-height: 2.8rem;
        padding-block: 0.35rem;
    }

    .dashboard-mobile-2 .project-release-chip span { font-size: 0.9rem; }
    .dashboard-mobile-2 .project-release-chip small { font-size: 0.65rem; }
}

/* Dashboard Mobile 2: full-width readable project cards */
@media (max-width: 767px) {
    .dashboard-mobile-2 .dashboard-project-grid {
        width: 100%;
        justify-items: stretch;
    }

    .dashboard-mobile-2 .dashboard-project-card {
        width: 100%;
        max-width: none;
        padding: 1rem !important;
    }

    .dashboard-mobile-2 .dashboard-project-avatar {
        width: 2.45rem;
        height: 2.45rem;
        flex-basis: 2.45rem;
        font-size: 0.82rem;
    }

    .dashboard-mobile-2 .dashboard-project-head a {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .dashboard-mobile-2 .dashboard-project-head .text-xs {
        font-size: 0.76rem;
    }

    .dashboard-mobile-2 .dashboard-project-card > .dashboard-project-head > .badge {
        min-height: 1.4rem;
        padding: 0.14rem 0.5rem;
        font-size: 0.68rem;
    }

    .dashboard-mobile-2 .dashboard-metric {
        min-height: 3.25rem;
    }

    .dashboard-mobile-2 .dashboard-metric .text-base {
        font-size: 1.04rem;
    }

    .dashboard-mobile-2 .dashboard-metric .text-xs {
        font-size: 0.72rem;
    }

    .dashboard-mobile-2 .project-release-title {
        font-size: 0.67rem;
    }

    .dashboard-mobile-2 .project-release-chip {
        min-height: 3rem;
    }

    .dashboard-mobile-2 .project-release-chip span {
        font-size: 0.98rem;
    }

    .dashboard-mobile-2 .project-release-chip small {
        font-size: 0.7rem;
    }
}

/* Requirements list: dedicated mobile presentation */
.requirements-mobile-list {
    display: none;
}

@media (max-width: 767px) {
    .requirements-filters {
        padding: 0.8rem;
        margin-bottom: 0.85rem;
        border-radius: 0.7rem;
    }

    .requirements-filter-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .requirements-filter-form > div {
        min-width: 0 !important;
        width: 100%;
    }

    .requirements-filter-form > div:first-child,
    .requirements-filter-actions {
        grid-column: 1 / -1;
    }

    .requirements-filter-form .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.68rem;
    }

    .requirements-filter-form .form-select {
        min-height: 2.35rem;
        padding: 0.42rem 0.6rem;
        font-size: 0.76rem;
    }

    .requirements-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .requirements-filter-actions .btn {
        width: 100%;
        min-height: 2.3rem;
        font-size: 0.72rem;
    }

    .requirements-desktop-table {
        display: none;
    }

    .requirements-mobile-list {
        display: grid;
        gap: 0.7rem;
    }

    .requirement-mobile-card {
        position: relative;
        padding: 0.9rem;
        overflow: hidden;
        border: 1px solid #e8edf3;
        border-radius: 0.72rem;
        background: #fff;
        box-shadow: 0 4px 12px rgba(20, 27, 45, 0.055);
    }

    .requirement-mobile-card.is-emergency {
        border-left: 3px solid #ef4444;
    }

    .requirement-mobile-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.65rem;
    }

    .requirement-mobile-kicker {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        margin-bottom: 0.25rem;
        color: #8b93a1;
        font-size: 0.65rem;
        line-height: 1.25;
    }

    .requirement-mobile-kicker a {
        color: var(--primary-600);
        font-weight: 500;
    }

    .requirement-mobile-kicker span::before {
        content: "•";
        margin-right: 0.45rem;
        color: #c3c9d2;
    }

    .requirement-mobile-title {
        display: block;
        color: #293142;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.35;
    }

    .requirement-emergency {
        display: grid;
        place-items: center;
        width: 1.8rem;
        height: 1.8rem;
        flex: 0 0 1.8rem;
        border-radius: 0.55rem;
        background: #fff1f2;
        color: #ef4444;
        font-size: 0.72rem;
    }

    .requirement-mobile-description {
        display: -webkit-box;
        margin: 0.45rem 0 0;
        overflow: hidden;
        color: #778195;
        font-size: 0.72rem;
        line-height: 1.45;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .requirement-mobile-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.65rem;
        margin-top: 0.75rem;
        padding-top: 0.65rem;
        border-top: 1px solid #eff2f6;
    }

    .requirement-mobile-badges,
    .requirement-mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .requirement-mobile-badges .badge {
        min-height: 1.3rem;
        font-size: 0.62rem;
        font-weight: 600;
    }

    .requirement-mobile-actions a,
    .requirement-mobile-actions button {
        display: grid;
        place-items: center;
        width: 1.85rem;
        height: 1.85rem;
        padding: 0;
        border: 1px solid #e5eaf1;
        border-radius: 0.55rem;
        background: #fff;
        color: #6e7a8d;
        font-size: 0.68rem;
    }

    .requirement-mobile-actions a:active {
        background: #eff6ff;
        color: var(--primary-600);
    }

    .requirement-mobile-actions form:last-child button {
        color: #ef4444;
    }
}

/* Mobile requirement metadata labels and semantic actions */
@media (max-width: 767px) {
    .requirement-mobile-footer {
        align-items: flex-end;
    }

    .requirement-mobile-badges {
        align-items: flex-end;
        gap: 0.65rem;
    }

    .requirement-mobile-meta,
    .requirement-mobile-actions-wrap {
        display: flex;
        align-items: center;
        gap: 0.28rem;
    }

    .requirement-mobile-actions-wrap {
        align-items: flex-end;
    }

    .requirement-mobile-label {
        color: #667085;
        font-size: 0.62rem;
        font-weight: 600;
        line-height: 1;
        letter-spacing: 0;
        text-transform: none;
    }

    .requirement-mobile-actions .action-view {
        border-color: #dbeafe;
        background: #eff6ff;
        color: #2563eb;
    }

    .requirement-mobile-actions .action-edit {
        border-color: #fde7b2;
        background: #fffbeb;
        color: #d97706;
    }

    .requirement-mobile-actions .action-delete {
        border-color: #fee2e2;
        background: #fff1f2;
        color: #e11d48;
    }

    .requirement-mobile-actions a:active,
    .requirement-mobile-actions button:active {
        filter: brightness(0.96);
        transform: translateY(1px);
    }
}

/* Requirements desktop actions and filter sizing */
.requirements-list-filter-card {
    border-color: #dbe5f1;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 28px rgba(39, 71, 117, 0.06);
}

.requirements-list-filter-card .requirements-filter-form {
    gap: 0.72rem;
}

.requirements-list-filter-card .form-label {
    color: #334c72;
    font-weight: 700;
}

.requirements-list-filter-card .form-select {
    min-width: 7.25rem;
    border-color: #d7e2f0;
    background-color: #fbfdff;
}

.requirements-search-field {
    min-width: 15rem;
}

.requirements-search-input-wrap {
    position: relative;
}

.requirements-search-input-wrap > i {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    z-index: 1;
    color: #8aa0bf;
    font-size: 0.74rem;
    transform: translateY(-50%);
}

.requirements-search-input-wrap .form-input {
    min-width: 15rem;
    padding-left: 2.15rem;
    border-color: #d7e2f0;
    background-color: #fbfdff;
}

.requirements-list-table {
    border: 1px solid #dbe5f1;
    border-radius: 0.75rem;
    box-shadow: 0 10px 28px rgba(39, 71, 117, 0.055);
}

.requirements-list-table thead {
    background: #f7faff;
}

.requirements-list-table .table-header {
    padding-top: 0.72rem;
    padding-bottom: 0.72rem;
    color: #587096;
    font-size: 0.65rem;
}

.requirements-list-table tbody tr {
    border-color: #edf2f8;
}

.requirements-list-table tbody tr:hover {
    background: #f8fbff;
}

.requirements-list-table .table-cell {
    padding-top: 0.82rem;
    padding-bottom: 0.82rem;
}

.requirements-list-table .requirement-title-cell {
    width: 56%;
    min-width: 23rem;
}

.requirements-list-table .requirement-title-cell a {
    color: #10264b;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
}

.requirements-list-table .requirement-title-cell p {
    max-width: 38rem;
    margin-top: 0.1rem;
    color: #597197;
    font-size: 0.69rem;
}

.requirements-list-table .requirement-project-cell a {
    font-weight: 500;
}

.requirements-list-table .requirement-date-cell {
    color: #5e759a;
}

.requirements-list-table .badge {
    min-height: 1.18rem;
    padding: 0.13rem 0.45rem;
    font-size: 0.61rem;
}

.requirements-list-table .requirement-actions-cell {
    padding-right: 0.7rem;
}

.requirements-filter-actions .btn {
    width: 5.6rem;
    min-width: 5.6rem;
    min-height: 2.65rem;
}

@media (min-width: 768px) {
    .requirements-list-filter-card .requirements-filter-actions {
        align-self: flex-end;
        margin-left: auto;
    }
}

.requirements-table-actions a,
.requirements-table-actions button {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    background: transparent;
    font-size: 0.72rem;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.requirements-table-actions .action-view {
    color: #2563eb;
}

.requirements-table-actions .action-view:hover {
    border-color: #dbeafe;
    background: #eff6ff;
}

.requirements-table-actions .action-edit {
    color: #d97706;
}

.requirements-table-actions .action-edit:hover {
    border-color: #fde7b2;
    background: #fffbeb;
}

.requirements-table-actions .action-delete {
    color: #e11d48;
}

.requirements-table-actions .action-delete:hover {
    border-color: #fee2e2;
    background: #fff1f2;
}

@media (max-width: 767px) {
    .requirements-search-field,
    .requirements-search-input-wrap .form-input {
        min-width: 0;
    }

    .requirements-filter-actions .btn {
        width: 100%;
        min-width: 0;
    }
}

/* Requirement detail page */
.screen-card-search {
    position: relative;
    min-width: 10.5rem;
}

.screen-show-page { width: 100%; }

.screen-summary-card {
    display: grid;
    grid-template-columns: minmax(13rem, 0.58fr) minmax(0, 1.42fr);
    gap: 1.5rem;
    overflow: hidden;
    padding: 1.35rem;
    border-color: #dbe5f1;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
}

.screen-summary-main { min-width: 0; }
.screen-summary-heading { display: flex; align-items: center; gap: 0.85rem; }
.screen-summary-icon {
    display: grid;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 0.85rem;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.15rem;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.1);
}
.screen-summary-icon.is-module { border-color: #ddd6fe; background: #f5f3ff; color: #7c3aed; }
.screen-summary-eyebrow { margin: 0 0 0.1rem; color: #64748b; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.screen-summary-heading h2 { color: #172554; font-size: 1.1rem; font-weight: 700; line-height: 1.35; }
.screen-summary-badges { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.4rem; }
.screen-summary-url {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    margin-top: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #e5edf7;
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.72);
    font-size: 0.75rem;
}
.screen-summary-url a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.screen-summary-description { margin-top: 0.85rem; color: #64748b; font-size: 0.78rem; line-height: 1.55; }

.screen-header-details {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.55rem;
    padding-left: 1.5rem;
    border-left: 1px solid #dbe5f1;
}

.screen-header-details > div { min-width: 0; padding: 0.55rem 0.65rem; border: 1px solid #e7edf5; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.74); }
.screen-header-details span { display: block; margin-bottom: 0.18rem; color: #64748b; font-size: 0.65rem; font-weight: 500; }
.screen-header-details strong, .screen-header-details a { display: block; overflow: hidden; color: #334155; font-size: 0.76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.screen-header-details a { color: var(--primary-600); }
.screen-created-by small { display: block; margin-top: 0.12rem; overflow: hidden; color: #94a3b8; font-size: 0.64rem; text-overflow: ellipsis; white-space: nowrap; }
.screen-detail-stat { position: relative; padding-left: 0.75rem !important; }
.screen-detail-stat::before { position: absolute; top: 0.65rem; bottom: 0.65rem; left: 0; width: 3px; border-radius: 3px; background: #94a3b8; content: ''; }
.screen-detail-stat.bugs::before { background: #ef4444; }
.screen-detail-stat.open-bugs::before { background: #f97316; }
.screen-detail-stat.requirements::before { background: #8b5cf6; }
.screen-detail-stat.points::before { background: #3b82f6; }

.screen-card-search > i {
    position: absolute;
    top: 50%;
    left: 0.65rem;
    color: #94a3b8;
    font-size: 0.7rem;
    transform: translateY(-50%);
}

.screen-card-search input {
    width: 100%;
    min-height: 2.1rem;
    padding: 0.42rem 0.65rem 0.42rem 1.85rem;
    border: 1px solid #dbe5f1;
    border-radius: 0.5rem;
    background: #fff;
    color: #334155;
    font-size: 0.75rem;
}

.screen-card-search input:focus {
    border-color: var(--primary-500);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.screen-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.screen-modal.hidden { display: none; }

.screen-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.screen-modal-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 42rem);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.25rem;
    border: 1px solid #dbe5f1;
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.25);
}

.screen-modal-header,
.screen-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.screen-modal-header { margin-bottom: 1rem; }
.screen-modal-header h2 { color: #1e293b; font-size: 1rem; font-weight: 700; }
.screen-modal-header button { color: #64748b; font-size: 1rem; }
.screen-modal-footer { margin-top: 1rem; justify-content: flex-end; }

.screen-modal-list {
    max-height: 19rem;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
}

.modal-requirement-row,
.modal-custom-point {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.75rem;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    font-size: 0.8rem;
}

.modal-requirement-row:last-child,
.modal-custom-point:last-child { border-bottom: 0; }
.modal-requirement-row { cursor: pointer; }
.modal-requirement-row:hover { background: #f8fbff; }
.modal-requirement-row input { margin-top: 0.18rem; }
.modal-requirement-row strong, .modal-requirement-row small { display: block; }
.modal-requirement-row small { margin-top: 0.12rem; color: #64748b; font-size: 0.68rem; }
.modal-custom-point { align-items: center; justify-content: space-between; }
.modal-custom-point button { color: #ef4444; }

@media (min-width: 1024px) {
    .screen-detail-sidebar { position: sticky; top: 5rem; align-self: start; }
}

@media (max-width: 639px) {
    .screen-card-search { width: 100%; }
    .screen-modal { padding: 0.65rem; }
    .screen-modal-panel { padding: 1rem; border-radius: 0.7rem; }
    .screen-modal-footer .btn { flex: 1; }

    .screen-detail-sidebar .card { padding: 1rem; }
    .screen-detail-sidebar .space-y-3 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
    .screen-detail-sidebar .space-y-3 > div { display: block; min-width: 0; }
    .screen-detail-sidebar .space-y-3 > div > span:first-child { display: block; margin-bottom: 0.12rem; font-size: 0.68rem; }
    .screen-detail-sidebar .space-y-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; }
    .screen-detail-sidebar .space-y-2 > * + * { margin-top: 0; }
    .screen-detail-sidebar .space-y-2 a { padding: 0.7rem; font-size: 0.75rem; }

    .screen-summary-card { grid-template-columns: 1fr; gap: 1rem; padding: 1rem; }
    .screen-header-details { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-top: 1rem; padding-left: 0; border-top: 1px solid #e7edf5; border-left: 0; }
}

.requirement-view {
    width: 100%;
    max-width: none;
}

.requirement-view-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.requirement-view-actions .btn {
    width: 5.75rem;
    min-width: 5.75rem;
}

.requirement-view-actions form {
    display: flex;
}

.requirement-view-card {
    padding: 1.5rem;
    border: 1px solid #e3eaf2;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 5px 16px rgba(20, 27, 45, 0.05);
}

.requirement-view-card + .requirement-view-card {
    margin-top: 1rem;
}

.requirement-view-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
}

.requirement-view-badges .badge {
    font-weight: 600;
}

.requirement-view-header-card h2 {
    margin: 0;
    color: #202939;
    font-size: clamp(1.15rem, calc(1rem + 0.3vw), 1.45rem);
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -0.015em;
}

.requirement-view-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin-top: 1.35rem;
    padding: 1rem 0;
    border: 1px solid #edf0f4;
    border-radius: 0.7rem;
    background: #fafbfc;
}

.requirement-view-meta > div {
    min-width: 0;
    padding: 0 1rem;
}

.requirement-view-meta > div:not(:last-child) {
    border-right: 1px solid #e8ebf0;
}

.requirement-view-meta span {
    display: block;
    margin-bottom: 0.28rem;
    color: #8a94a4;
    font-size: 0.68rem;
    font-weight: 500;
}

.requirement-view-meta a,
.requirement-view-meta strong {
    display: block;
    overflow: hidden;
    color: #303846;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.requirement-view-meta a {
    color: var(--primary-600);
}

.requirement-view-section-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.requirement-view-section-heading > span {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    border-radius: 0.65rem;
    background: #eff6ff;
    color: var(--primary-600);
    font-size: 0.78rem;
}

.requirement-view-section-heading h3 {
    margin: 0;
    color: #303846;
    font-size: 0.9rem;
    font-weight: 600;
}

.requirement-view-section-heading p {
    margin: 0.12rem 0 0;
    color: #929aa8;
    font-size: 0.68rem;
}

.requirement-view-description {
    padding: 1rem;
    border-radius: 0.65rem;
    background: #f8fafc;
    color: #465267;
    font-size: 0.84rem;
    line-height: 1.65;
}

.requirement-view-attachment-card img {
    width: auto;
    max-width: 100%;
    max-height: 30rem;
    border: 1px solid #e3e8ef;
    border-radius: 0.7rem;
    object-fit: contain;
}

@media (max-width: 767px) {
    .requirement-view-actions {
        gap: 0.5rem;
        margin-top: 0.75rem;
        margin-bottom: 0;
    }

    .requirement-view-actions .btn {
        width: 5.25rem;
        min-width: 5.25rem;
        min-height: 2.25rem;
        font-size: 0.7rem;
    }

    .requirement-view-card {
        padding: 1rem;
        border-radius: 0.72rem;
    }

    .requirement-view-card + .requirement-view-card {
        margin-top: 0.75rem;
    }

    .requirement-view-badges {
        margin-bottom: 0.6rem;
    }

    .requirement-view-header-card h2 {
        font-size: 1.08rem;
    }

    .requirement-view-meta {
        grid-template-columns: 1fr;
        margin-top: 1rem;
        padding: 0.2rem 0.85rem;
    }

    .requirement-view-meta > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.8rem;
        padding: 0.7rem 0;
    }

    .requirement-view-meta > div:not(:last-child) {
        border-right: 0;
        border-bottom: 1px solid #e8ebf0;
    }

    .requirement-view-meta span {
        margin: 0;
        font-size: 0.68rem;
    }

    .requirement-view-meta a,
    .requirement-view-meta strong {
        max-width: 65%;
        font-size: 0.76rem;
        text-align: right;
    }

    .requirement-view-section-heading {
        margin-bottom: 0.75rem;
    }

    .requirement-view-section-heading > span {
        width: 2rem;
        height: 2rem;
        flex-basis: 2rem;
    }

    .requirement-view-section-heading h3 {
        font-size: 0.82rem;
    }

    .requirement-view-section-heading p {
        font-size: 0.63rem;
    }

    .requirement-view-description {
        padding: 0.85rem;
        font-size: 0.78rem;
        line-height: 1.6;
    }
}

/* Bugs list: dedicated mobile presentation */
.bugs-mobile-list {
    display: none;
}

@media (max-width: 767px) {
    .bugs-filters {
        padding: 0.8rem;
        margin-bottom: 0.85rem;
        border-radius: 0.7rem;
    }

    .bugs-filter-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .bugs-filter-form > div {
        width: 100%;
        min-width: 0 !important;
    }

    .bugs-filter-form > div:first-child,
    .bugs-filter-actions {
        grid-column: 1 / -1;
    }

    .bugs-filter-form .form-label {
        margin-bottom: 0.25rem;
        font-size: 0.68rem;
    }

    .bugs-filter-form .form-select {
        min-height: 2.35rem;
        padding: 0.42rem 0.6rem;
        font-size: 0.76rem;
    }

    .bugs-filter-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .bugs-filter-actions .btn {
        width: 100%;
        min-height: 2.3rem;
        font-size: 0.72rem;
    }

    .bugs-filter-actions .btn:first-child {
        grid-column: 2;
        grid-row: 1;
        border-color: var(--primary-500);
        background: var(--primary-500);
        color: #fff;
    }

    .bugs-filter-actions .btn:last-child {
        grid-column: 1;
        grid-row: 1;
    }

    .bugs-desktop-table {
        display: none;
    }

    .bugs-mobile-list {
        display: grid;
        gap: 0.7rem;
    }

    .bug-mobile-card {
        padding: 0.9rem;
        border: 1px solid #e7ecf2;
        border-radius: 0.72rem;
        background: #fff;
        box-shadow: 0 4px 12px rgba(20, 27, 45, 0.055);
    }

    .bug-mobile-context {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.3rem;
        margin-bottom: 0.35rem;
        color: #929baa;
        font-size: 0.62rem;
        line-height: 1.3;
    }

    .bug-mobile-context a {
        color: var(--primary-600);
        font-weight: 500;
    }

    .bug-mobile-context span::before,
    .bug-mobile-context time::before {
        content: "•";
        margin-right: 0.3rem;
        color: #c3c9d2;
    }

    .bug-mobile-context time {
        margin-left: auto;
    }

    .bug-mobile-title {
        display: block;
        color: #293142;
        font-size: 0.88rem;
        font-weight: 600;
        line-height: 1.38;
    }

    .bug-mobile-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin-top: 0.7rem;
        padding: 0.6rem 0.15rem;
        border: 1px solid #eef1f5;
        border-radius: 0.58rem;
        background: #fafbfc;
    }

    .bug-mobile-meta > div {
        min-width: 0;
        padding: 0 0.35rem;
        text-align: center;
    }

    .bug-mobile-meta > div:not(:last-child) {
        border-right: 1px solid #e7ebf0;
    }

    .bug-mobile-meta span,
    .bug-mobile-meta strong {
        display: block;
        overflow: hidden;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bug-mobile-meta span {
        color: #8b95a5;
        font-size: 0.58rem;
    }

    .bug-mobile-meta strong {
        margin-top: 0.2rem;
        font-size: 0.67rem;
        font-weight: 600;
    }

    .bug-mobile-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-top: 0.7rem;
        padding-top: 0.65rem;
        border-top: 1px solid #eff2f6;
    }

    .bug-mobile-assignee,
    .bug-mobile-actions {
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }

    .bug-mobile-assignee {
        min-width: 0;
        color: #788397;
        font-size: 0.62rem;
    }

    .bug-mobile-assignee img {
        width: 1.5rem;
        height: 1.5rem;
        flex: 0 0 1.5rem;
        border-radius: 999px;
    }

    .bug-mobile-assignee > span:not(.bug-mobile-images) {
        max-width: 5.5rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bug-mobile-images {
        display: inline-flex;
        align-items: center;
        gap: 0.22rem;
        margin-left: 0.2rem;
        color: #2563eb;
    }

    .bug-mobile-actions a,
    .bug-mobile-actions button {
        display: grid;
        place-items: center;
        width: 1.8rem;
        height: 1.8rem;
        padding: 0;
        border: 1px solid;
        border-radius: 0.52rem;
        font-size: 0.65rem;
    }

    .bug-mobile-actions .action-view {
        border-color: #dbeafe;
        background: #eff6ff;
        color: #2563eb;
    }

    .bug-mobile-actions .action-edit {
        border-color: #fde7b2;
        background: #fffbeb;
        color: #d97706;
    }

    .bug-mobile-actions .action-share {
        border-color: #d1fae5;
        background: #ecfdf5;
        color: #059669;
    }

    .bug-mobile-actions .action-delete {
        border-color: #fee2e2;
        background: #fff1f2;
        color: #e11d48;
    }
}

/* Bugs mobile readability and professional metadata */
@media (max-width: 767px) {
    .bugs-mobile-list {
        gap: 0.85rem;
    }

    .bug-mobile-card {
        padding: 1.05rem;
        border-radius: 0.8rem;
        box-shadow: 0 5px 15px rgba(20, 27, 45, 0.065);
    }

    .bug-mobile-context {
        gap: 0.38rem;
        margin-bottom: 0.45rem;
        font-size: 0.69rem;
    }

    .bug-mobile-title {
        font-size: 0.96rem;
        line-height: 1.45;
    }

    .bug-mobile-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
        margin-top: 0.85rem;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .bug-mobile-meta > div {
        display: inline-flex;
        align-items: center;
        gap: 0.32rem;
        width: auto;
        padding: 0.42rem 0.58rem;
        border: 1px solid #e7ebf1;
        border-radius: 0.55rem;
        background: #f8fafc;
        text-align: left;
    }

    .bug-mobile-meta > div:nth-child(1) {
        border-color: #dbeafe;
        background: #f5f9ff;
    }

    .bug-mobile-meta > div:nth-child(2) {
        border-color: #ede9fe;
        background: #faf8ff;
    }

    .bug-mobile-meta > div:nth-child(3) {
        border-color: #fee2e2;
        background: #fff8f8;
    }

    .bug-mobile-meta > div:not(:last-child) {
        border-right-width: 1px;
    }

    .bug-mobile-meta span,
    .bug-mobile-meta strong {
        display: inline;
        overflow: visible;
        line-height: 1.2;
        text-overflow: clip;
        white-space: nowrap;
    }

    .bug-mobile-meta span {
        color: #7b8596;
        font-size: 0.67rem;
        font-weight: 500;
    }

    .bug-mobile-meta strong {
        margin-top: 0;
        font-size: 0.72rem;
        font-weight: 600;
    }

    .bug-mobile-footer {
        flex-wrap: wrap;
        gap: 0.7rem;
        margin-top: 0.9rem;
        padding-top: 0.8rem;
    }

    .bug-mobile-assignee {
        flex: 1 1 8rem;
        gap: 0.4rem;
        font-size: 0.68rem;
    }

    .bug-mobile-assignee-label {
        color: #8a94a4;
        font-weight: 500;
    }

    .bug-mobile-assignee img {
        width: 1.7rem;
        height: 1.7rem;
        flex-basis: 1.7rem;
    }

    .bug-mobile-assignee strong {
        max-width: 6.5rem;
        overflow: hidden;
        color: #4a5568;
        font-size: 0.7rem;
        font-weight: 500;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bug-mobile-assignee .is-unassigned {
        color: #7b8596;
    }

    .bug-mobile-images {
        font-size: 0.68rem;
    }

    .bug-mobile-actions {
        margin-left: auto;
        gap: 0.4rem;
    }

    .bug-mobile-actions a,
    .bug-mobile-actions button {
        width: 2rem;
        height: 2rem;
        border-radius: 0.58rem;
        font-size: 0.7rem;
    }
}

/* Bug detail: mobile-only redesign */
.bug-mobile-top-actions,
.bug-mobile-classification {
    display: none;
}

@media (max-width: 767px) {
    .bug-desktop-header-action,
    .bug-classification-badges,
    .bug-side-actions {
        display: none !important;
    }

    .bug-mobile-top-actions {
        display: flex;
        justify-content: flex-end;
        gap: 0.45rem;
        margin-bottom: 0.75rem;
    }

    .bug-mobile-top-actions > a,
    .bug-mobile-top-actions button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
        min-height: 2.15rem;
        padding: 0.42rem 0.62rem;
        border: 1px solid;
        border-radius: 0.58rem;
        font-size: 0.66rem;
        font-weight: 600;
        line-height: 1;
    }

    .bug-mobile-top-actions .action-back {
        margin-right: auto;
        border-color: #dfe5ed;
        background: #fff;
        color: #5f6b7c;
    }

    .bug-mobile-top-actions .action-share {
        border-color: #d1fae5;
        background: #ecfdf5;
        color: #059669;
    }

    .bug-mobile-top-actions .action-edit {
        border-color: #fde7b2;
        background: #fffbeb;
        color: #d97706;
    }

    .bug-mobile-top-actions .action-delete {
        border-color: #fee2e2;
        background: #fff1f2;
        color: #e11d48;
    }

    .bug-view-layout {
        gap: 0.8rem;
    }

    .bug-view-layout .space-y-5 > :not([hidden]) ~ :not([hidden]) {
        margin-top: 0.8rem;
    }

    .bug-view-info {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .bug-mobile-classification {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
        margin-bottom: 0.9rem;
    }

    .bug-mobile-classification-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 5.1rem;
        padding: 0.55rem 0.25rem;
        border: 1px solid;
        border-radius: 0.68rem;
        text-align: center;
    }

    .bug-mobile-classification-card.priority-card {
        border-color: #dbeafe;
        background: #f5f9ff;
    }

    .bug-mobile-classification-card.severity-card {
        border-color: #ede9fe;
        background: #faf8ff;
    }

    .bug-mobile-classification-card.status-card {
        border-color: #dcfce7;
        background: #f4fdf7;
    }

    .bug-mobile-classification-card > span {
        display: grid;
        place-items: center;
        width: 1.65rem;
        height: 1.65rem;
        margin-bottom: 0.35rem;
        border-radius: 0.5rem;
        background: #fff;
        color: #64748b;
        font-size: 0.66rem;
        box-shadow: 0 2px 5px rgba(20, 27, 45, 0.06);
    }

    .bug-mobile-classification-card.priority-card > span { color: #2563eb; }
    .bug-mobile-classification-card.severity-card > span { color: #7c3aed; }
    .bug-mobile-classification-card.status-card > span { color: #16a34a; }

    .bug-mobile-classification-card small {
        color: #8a94a4;
        font-size: 0.61rem;
        font-weight: 500;
        line-height: 1.1;
    }

    .bug-mobile-classification-card strong {
        display: block;
        max-width: 100%;
        margin-top: 0.2rem;
        overflow: hidden;
        font-size: 0.72rem;
        font-weight: 600;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bug-view-info > h2 {
        margin-bottom: 0.75rem;
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .bug-view-info > .bg-slate-50 {
        padding: 0.85rem;
        border-radius: 0.65rem;
        font-size: 0.78rem;
        line-height: 1.6;
    }

    .bug-view-info > .bg-blue-50 {
        gap: 0.5rem;
        padding: 0.65rem;
        border-radius: 0.65rem;
    }

    .bug-view-info > .bg-blue-50 .btn {
        min-height: 2rem;
        padding: 0.35rem 0.5rem;
    }

    .bug-view-layout .card {
        border-radius: 0.75rem;
    }

    .bug-view-layout .card.p-5 {
        padding: 1rem;
    }

    .bug-view-layout .card h3 {
        font-size: 0.82rem;
    }

    .bug-view-layout form.flex.gap-3 {
        gap: 0.55rem;
    }

    .bug-view-layout form.flex.gap-3 > .flex-1 {
        flex-direction: column;
    }

    .bug-view-layout form.flex.gap-3 .btn {
        align-self: flex-end;
    }
}

/* Bug detail mobile compact layout */
@media (max-width: 767px) {
    .bug-view-layout {
        display: flex !important;
        flex-direction: column;
        gap: 0.75rem;
    }

    .bug-main-column,
    .bug-side-column {
        display: contents;
    }

    .bug-main-column > *,
    .bug-side-column > * {
        margin-top: 0 !important;
    }

    .bug-view-info { order: 1; }
    .bug-details-card { order: 2; }
    .bug-screenshots-card { order: 3; }
    .bug-comments-card { order: 4; }
    .bug-linked-ticket-card { order: 5; }

    .bug-view-info {
        padding: 0.8rem;
    }

    .bug-mobile-classification {
        gap: 0.38rem;
        margin-bottom: 0.65rem;
    }

    .bug-mobile-classification-card {
        min-height: 3.5rem;
        padding: 0.45rem 0.18rem;
        border-radius: 0.58rem;
    }

    .bug-mobile-classification-card > span {
        display: none;
    }

    .bug-mobile-classification-card small {
        font-size: 0.58rem;
    }

    .bug-mobile-classification-card strong {
        margin-top: 0.22rem;
        font-size: 0.69rem;
    }

    .bug-view-info > h2 {
        margin-bottom: 0.55rem;
        font-size: 0.98rem;
    }

    .bug-view-info > .bg-slate-50 {
        margin-bottom: 0.6rem;
        padding: 0.7rem;
        font-size: 0.74rem;
        line-height: 1.5;
    }

    .bug-view-info > .bg-blue-50 {
        padding: 0.52rem 0.6rem;
    }

    .bug-details-card {
        padding: 0.85rem !important;
    }

    .bug-details-card > h3 {
        margin-bottom: 0.65rem;
        font-size: 0.78rem;
    }

    .bug-details-card > .space-y-3 {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .bug-details-card > .space-y-3 > div {
        min-width: 0;
        margin-top: 0 !important;
        padding: 0.55rem;
        border: 1px solid #edf0f4;
        border-radius: 0.55rem;
        background: #fafbfc;
    }

    .bug-details-card > .space-y-3 > div > .text-xs {
        margin-bottom: 0.2rem;
        font-size: 0.58rem;
    }

    .bug-details-card > .space-y-3 a,
    .bug-details-card > .space-y-3 .font-medium {
        display: block;
        overflow: hidden;
        font-size: 0.7rem;
        line-height: 1.3;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .bug-details-card > .space-y-3 img {
        width: 1.35rem;
        height: 1.35rem;
    }
}
