/* Import Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Bootstrap CSS */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css');

/* HSMS Design System - Exact match to React */
:root {
    /* Primary Dark Blue #233559 */
    --primary: 218 44% 24%;
    --primary-foreground: 0 0% 100%;
    
    /* Secondary Yellow/Gold Accent #F4D324 */
    --accent: 49 91% 55%;
    --accent-foreground: 218 44% 24%;
    
    --background: 0 0% 98%;
    --foreground: 218 44% 24%;

    --card: 0 0% 100%;
    --card-foreground: 218 44% 24%;

    --popover: 0 0% 100%;
    --popover-foreground: 218 44% 24%;

    --secondary: 220 14% 96%;
    --secondary-foreground: 218 44% 24%;

    --muted: 220 14% 96%;
    --muted-foreground: 218 20% 46%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 0 0% 100%;

    --success: 142 71% 45%;
    --success-foreground: 0 0% 100%;

    --warning: 38 92% 50%;
    --warning-foreground: 0 0% 100%;

    --border: 220 13% 91%;
    --input: 220 13% 91%;
    --ring: 218 44% 24%;

    --radius: 0.5rem;

    /* Sidebar - Dark Blue Theme */
    --sidebar-background: 218 44% 24%;
    --sidebar-foreground: 0 0% 100%;
    --sidebar-primary: 49 91% 55%;
    --sidebar-primary-foreground: 218 44% 24%;
    --sidebar-accent: 218 44% 30%;
    --sidebar-accent-foreground: 0 0% 100%;
    --sidebar-border: 218 44% 30%;
    --sidebar-ring: 49 91% 55%;
    
    /* Header */
    --header-background: 218 44% 24%;
    --header-foreground: 0 0% 100%;
}

/* Base Styles */
* {
    border-color: hsl(var(--border));
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-smooth: antialiased;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header Styles - Fixed Top */
.header {
    background-color: hsl(var(--header-background));
    color: hsl(var(--header-foreground));
    height: 64px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.header .logo {
    /* width: 40px; */
    min-height: 40px;
    padding: 0 14px;
    background-color: hsl(var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: hsl(var(--accent-foreground));
    font-size: 1.25rem;
    margin-right: 1rem;
}

.header .page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--header-foreground));
}

/* Sidebar Styles - Fixed Left */
.sidebar {
    background-color: hsl(var(--sidebar-background));
    color: hsl(var(--sidebar-foreground));
    position: fixed;
    top: 64px;
    left: 0;
    width: 256px;
    height: calc(100vh - 64px);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: hsla(var(--sidebar-foreground) / 0.3);
    border-radius: 3px;
}

.sidebar-menu {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
}

.sidebar-menu > li {
    margin-bottom: 0.25rem;
}

.sidebar-menu li a {
    color: hsla(var(--sidebar-foreground) / 0.8);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    border-radius: calc(var(--radius) - 2px);
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
}

.sidebar-menu li a:hover {
    background-color: hsla(var(--sidebar-accent-foreground) / 0.1);
    color: hsl(var(--sidebar-foreground));
}

.sidebar-menu li a.active {
    background-color: hsla(var(--sidebar-primary) / 0.2);
    color: hsl(var(--sidebar-primary));
}

.sidebar-menu li a svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

/* Sidebar Submenu */
.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: hsla(var(--sidebar-accent-foreground) / 0.05);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    border-radius: calc(var(--radius) - 2px);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.sidebar-submenu.show {
    max-height: 500px;
    opacity: 1;
    padding: 0.25rem 0;
}

.sidebar-submenu li a {
    padding-left: 2.5rem;
    font-size: 0.8125rem;
}

.sidebar-toggle svg {
    transition: transform 0.3s ease;
}

.sidebar-toggle svg.rotate-180 {
    transform: rotate(180deg);
}

/* Main Content */
.main-content {
    margin-left: 256px;
    margin-top: 64px;
    padding: 1rem;
    min-height: calc(100vh - 64px);
    transition: margin-left 0.3s ease;
}

@media (min-width: 768px) {
    .main-content {
        padding: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .main-content {
        padding: 2rem;
    }
}

/* Cards - Match React Card Component */
.card {
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards - Match React StatCard */
.stat-card {
    border-left: 4px solid hsl(var(--primary)) ;
    border-radius: var(--radius) ;
    transition: all 0.2s;
    cursor: pointer;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
}

.default-color {
    border-left: 4px solid hsl(var(--primary)) !important;
    border-radius: var(--radius) !important;
}
.red-color{
    /* color:  hsl(var(--destructive)) !important; */
    border-left: 4px solid  hsl(var(--destructive)) !important;

}

.success-color{
      /* color: hsl(var(--success)) !important; */
    border-left: 4px solid hsl(var(--success)) !important;
}
.accent-color{
    /* color: hsl(var(--warning)) !important; */
    border-left: 4px solid hsl(var(--warning)) !important;
}
.stat-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.stat-card.accent {
    border-left-color: hsl(var(--accent));
}

.stat-card.warning {
    border-left-color: hsl(var(--warning));
}

.stat-card.success {
    border-left-color: hsl(var(--success));
}

.stat-card.destructive {
    border-left-color: hsl(var(--destructive));
}

.stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    background-color: hsla(var(--primary) / 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.stat-card:hover .stat-icon {
    background-color: hsla(var(--primary) / 0.2);
}

.stat-card.accent .stat-icon {
    background-color: hsla(var(--accent) / 0.1);
}

.stat-card.accent:hover .stat-icon {
    background-color: hsla(var(--accent) / 0.2);
}

.stat-card .stat-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: hsl(var(--primary));
}

.stat-card.accent .stat-icon svg {
    color: hsl(var(--accent));
}

.stat-card .stat-value {
    font-size: 1.875rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: hsl(var(--foreground));
}

.stat-card .stat-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0;
}

/* Buttons - Match React Button Component */
.btn {
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsla(var(--primary) / 0.9);
    color: hsl(var(--primary-foreground));
}

.btn-outline {
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-sm {
    height: 2.25rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

.btn svg {
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    flex-shrink: 0;
}

/* Badges - Match React Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.badge-outline {
    border-color: hsl(var(--border));
    background-color: transparent;
    color: hsl(var(--foreground));
}

/* Status Badges - Match React StatusBadge */
.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.active,
.status-badge.completed,
.status-badge.closed {
    background-color: hsla(var(--success) / 0.1);
    color: hsl(var(--success));
    border-color: hsla(var(--success) / 0.2);
}

.status-badge.inactive {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border-color: hsl(var(--muted));
}

.status-badge.pending {
    background-color: hsla(var(--warning) / 0.1);
    color: hsl(var(--warning));
    border-color: hsla(var(--warning) / 0.2);
}

.status-badge.in-progress {
    background-color: hsla(var(--primary) / 0.1);
    color: hsl(var(--primary));
    border-color: hsla(var(--primary) / 0.2);
}

.status-badge.open {
    background-color: hsla(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border-color: hsla(var(--destructive) / 0.2);
}

.status-badge.expired {
    background-color: hsla(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border-color: hsla(var(--destructive) / 0.2);
}

.status-badge.warning {
    background-color: hsla(var(--warning) / 0.1);
    color: hsl(var(--warning));
    border-color: hsla(var(--warning) / 0.2);
}

/* Severity Badges */
.severity-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.severity-badge.low {
    background-color: hsla(var(--success) / 0.1);
    color: hsl(var(--success));
    border-color: hsla(var(--success) / 0.2);
}

.severity-badge.medium {
    background-color: hsla(var(--warning) / 0.1);
    color: hsl(var(--warning));
    border-color: hsla(var(--warning) / 0.2);
}

.severity-badge.high {
    background-color: hsla(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
    border-color: hsla(var(--destructive) / 0.2);
}

/* Tables - Match React Table Component */
.table-wrapper {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    overflow: hidden;
}

.table {
    width: 100%;
    font-size: 0.875rem;
    margin-bottom: 0;
}

.table thead tr {
    border-bottom: 1px solid hsl(var(--border));
}

.table thead th {
    height: 3rem;
    padding: 1rem;
    text-align: left;
    vertical-align: middle;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    background-color: hsla(var(--muted) / 0.5);
}

.table tbody tr {
    border-bottom: 1px solid hsl(var(--border));
    transition: background-color 0.2s;
}

.table tbody tr:last-child {
    border-bottom: 0;
}

.table tbody tr:hover {
    background-color: hsla(var(--muted) / 0.3);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Form Inputs - Match React Input Component */
.form-control,
.form-select {
    height: 2.5rem;
    border-radius: calc(var(--radius) - 2px);
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsla(var(--ring) / 0.2);
}

.form-control::placeholder {
    color: hsl(var(--muted-foreground));
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.form-check-input {
    width: 1rem;
    height: 1rem;
    border-radius: calc(var(--radius) - 4px);
    border: 1px solid hsl(var(--input));
}

.form-check-input:checked {
    background-color: hsl(var(--primary));
    border-color: hsl(var(--primary));
}

/* Textarea - Match React Textarea */
textarea.form-control {
    min-height: 5rem;
    resize: vertical;
}

/* Page Header - Match React PageHeader */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.page-header-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    margin: 0;
}

@media (min-width: 768px) {
    .page-header-title {
        font-size: 2.25rem;
    }
}

.page-header-subtitle {
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
    margin-bottom: 0;
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(218 44% 18%) 100%);
    padding: 1.25rem;
}

.auth-card {
    background: hsl(var(--card));
    border-radius: calc(var(--radius) + 2px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    max-width: 28rem;
    width: 100%;
}

.auth-logo {
    width: 5rem;
    height: 5rem;
    background-color: hsl(var(--accent));
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 2rem;
    font-weight: 700;
    color: hsl(var(--accent-foreground));
}

/* Role Selection Cards */
.role-card {
    border: 2px solid hsl(var(--border));
    border-radius: calc(var(--radius) + 2px);
    padding: 1.875rem;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: block;
    background-color: hsl(var(--card));
}

.role-card:hover {
    border-color: hsl(var(--primary));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.role-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9375rem;
}

.role-icon.primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.role-icon.accent {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.role-icon.success {
    background-color: hsl(var(--success));
    color: hsl(var(--success-foreground));
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.show {
    display: block;
}

/* Responsive */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Footer */
.footer {
    background-color: hsl(var(--background));
    border-top: 1px solid hsl(var(--border));
    padding: 1.25rem;
    margin-top: auto;
}

/* Utility Classes */
.text-muted-foreground {
    color: hsl(var(--muted-foreground));
}

.bg-muted {
    background-color: hsl(var(--muted));
}

.border-border {
    border-color: hsl(var(--border));
}

/* Animation */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fade-in 0.3s ease-in-out;
}

/* Statutory Tasks */
.statutory-page {
    max-width: 100%;
}

.statutory-page-header,
.statutory-back-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.statutory-back-row {
    justify-content: flex-start;
}

.statutory-back-link {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: hsl(var(--primary));
    text-decoration: none;
    font-size: 1.25rem;
}

.statutory-back-link:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
    color: hsl(var(--primary));
    margin: 0 0 0.5rem;
}

.statutory-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: hsl(218 28% 46%);
}

.statutory-primary-btn,
.statutory-secondary-btn {
    min-height: 3rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.statutory-primary-btn {
    background-color: hsl(var(--primary));
    color: #fff;
}

.statutory-primary-btn:hover {
    background-color: hsl(218 44% 20%);
    color: #fff;
}

.statutory-secondary-btn {
    background-color: #fff;
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--border));
}

.statutory-secondary-btn:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 420px));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.statutory-search {
    position: relative;
}

.statutory-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(218 20% 46%);
}

.statutory-search .form-control,
.statutory-input {
    min-height: 3.25rem;
    padding-left: 2.85rem;
    border-radius: 0.85rem;
    border: 1px solid hsl(var(--border));
    font-size: 1rem;
}

.statutory-card {
    background: #fff;
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(35, 53, 89, 0.06);
}

.statutory-table thead th {
    background: transparent;
    color: hsl(218 32% 47%);
    font-weight: 600;
    padding: 1.3rem 1.35rem;
}

.statutory-table tbody td {
    padding: 1.4rem 1.35rem;
    color: hsl(var(--primary));
    font-size: 1rem;
}

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

.statutory-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.9rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
}

.statutory-badge-upcoming {
    color: #27497c;
    background: #eef3fa;
    border-color: #bfd0ea;
}

.statutory-badge-due-today {
    color: #d18116;
    background: #fff5e6;
    border-color: #ffd49a;
}

.statutory-badge-overdue {
    color: #ff453a;
    background: #fff0ef;
    border-color: #ffc0bc;
}

.statutory-badge-completed {
    color: #10a95b;
    background: #eafbf1;
    border-color: #b5ebca;
}

.statutory-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: hsl(var(--primary));
    text-decoration: none;
}

.statutory-icon-btn:hover {
    background: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-form-page {
    max-width: 100%;
}

.statutory-form-card,
.statutory-detail-card,
.statutory-status-card {
    padding: 1.9rem 2rem;
}

.statutory-section-title {
    margin: 0 0 1.75rem;
    color: hsl(var(--primary));
    font-size: 1.05rem;
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    font-weight: 700;
}

.statutory-input-icon {
    position: relative;
}

.statutory-input-icon i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(var(--primary));
}

.statutory-input-icon .statutory-input {
    padding-right: 2.75rem;
}

.statutory-textarea {
    min-height: 7.5rem;
    border-radius: 0.85rem;
    border: 1px solid hsl(var(--border));
    padding: 1rem 1rem;
    font-size: 1rem;
    resize: vertical;
}

.statutory-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.75rem;
}

.statutory-description {
    color: hsl(218 28% 46%);
    font-size: 1rem;
    line-height: 1.55;
    max-width: 56rem;
}

.statutory-status-card {
    min-height: 100%;
}

.statutory-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(218 28% 46%);
}

.statutory-meta-row-first {
    margin-top: 0.25rem;
}

.statutory-meta-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.7rem;
}

.statutory-meta-item i {
    margin-top: 0.15rem;
    color: hsl(218 25% 50%);
    font-size: 1.2rem;
}

.statutory-meta-item span {
    display: block;
    color: hsl(218 28% 46%);
    margin-bottom: 0.15rem;
}

.statutory-meta-item strong {
    color: hsl(var(--primary));
    font-size: 1rem;
    font-weight: 500;
}

.statutory-help-text {
    margin: 0.75rem 0 1.5rem;
    color: hsl(218 28% 46%);
    font-size: 1rem;
}

@media (max-width: 991px) {
    .statutory-filter-row {
        grid-template-columns: 1fr;
    }

    .statutory-page-header,
    .statutory-back-row,
    .statutory-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .statutory-primary-btn,
    .statutory-secondary-btn {
        justify-content: center;
    }

    .statutory-form-card,
    .statutory-detail-card,
    .statutory-status-card {
        padding: 1.5rem;
    }
}
/* Statutory Tasks */
.statutory-page {
    max-width: 100%;
}

.statutory-page-header,
.statutory-back-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.statutory-back-row {
    justify-content: flex-start;
}

.statutory-back-link {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: hsl(var(--primary));
    text-decoration: none;
    font-size: 1.25rem;
}

.statutory-back-link:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    font-weight: 700;
    color: hsl(var(--primary));
    margin: 0 0 0.5rem;
}

.statutory-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: hsl(218 28% 46%);
}

.statutory-primary-btn,
.statutory-secondary-btn {
    min-height: 3rem;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.statutory-primary-btn {
    background-color: hsl(var(--primary));
    color: #fff;
}

.statutory-primary-btn:hover {
    background-color: hsl(218 44% 20%);
    color: #fff;
}

.statutory-secondary-btn {
    background-color: #fff;
    color: hsl(var(--primary));
    border: 1px solid hsl(var(--border));
}

.statutory-secondary-btn:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 420px) minmax(220px, 320px) auto;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.statutory-search {
    position: relative;
}

.statutory-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: hsl(218 20% 46%);
}

.statutory-search .form-control,
.statutory-input {
    min-height: 3.25rem;
    padding-left: 2.85rem;
    border-radius: 0.85rem;
    border: 1px solid hsl(var(--border));
    font-size: 1rem;
}

.statutory-filter-actions {
    align-items: stretch;
}

.statutory-card {
    background: #fff;
    border: 1px solid hsl(var(--border));
    border-radius: 1rem;
    box-shadow: 0 4px 18px rgba(35, 53, 89, 0.06);
}

.statutory-table thead th {
    background: transparent;
    color: hsl(218 32% 47%);
    font-weight: 600;
    padding: 1.3rem 1.35rem;
}

.statutory-table tbody td {
    padding: 1.4rem 1.35rem;
    color: hsl(var(--primary));
    font-size: 1rem;
}

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

.statutory-table-note {
    margin-top: 0.25rem;
}

.statutory-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.9rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 500;
}

.statutory-badge-upcoming,
.statutory-badge-active {
    color: #27497c;
    background: #eef3fa;
    border-color: #bfd0ea;
}

.statutory-badge-due-today {
    color: #d18116;
    background: #fff5e6;
    border-color: #ffd49a;
}

.statutory-badge-overdue,
.statutory-badge-inactive {
    color: #ff453a;
    background: #fff0ef;
    border-color: #ffc0bc;
}

.statutory-badge-completed {
    color: #10a95b;
    background: #eafbf1;
    border-color: #b5ebca;
}

.statutory-badge-assigned {
    color: #7a51c2;
    background: #f2ebff;
    border-color: #d8c5ff;
}

.statutory-icon-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: hsl(var(--primary));
    text-decoration: none;
}

.statutory-icon-btn:hover {
    background: hsl(var(--secondary));
    color: hsl(var(--primary));
}

.statutory-form-page {
    max-width: 100%;
}

.statutory-form-card,
.statutory-detail-card,
.statutory-status-card {
    padding: 1.9rem 2rem;
}

.statutory-section-title {
    margin: 0 0 1.75rem;
    color: hsl(var(--primary));
    font-size: clamp(1.8rem, 2vw, 2.2rem);
    font-weight: 700;
}

.statutory-textarea {
    min-height: 7.5rem;
    border-radius: 0.85rem;
    border: 1px solid hsl(var(--border));
    padding: 1rem 1rem;
    font-size: 1rem;
    resize: vertical;
}

.statutory-description {
    color: hsl(218 28% 46%);
    font-size: 1rem;
    line-height: 1.55;
    max-width: 56rem;
}

.statutory-status-card {
    min-height: 100%;
}

.statutory-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    color: hsl(218 28% 46%);
}

.statutory-meta-row-first {
    margin-top: 0.25rem;
}

.statutory-meta-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.7rem;
}

.statutory-meta-item i {
    margin-top: 0.15rem;
    color: hsl(218 25% 50%);
    font-size: 1.2rem;
}

.statutory-meta-item span {
    display: block;
    color: hsl(218 28% 46%);
    margin-bottom: 0.15rem;
}

.statutory-meta-item strong {
    color: hsl(var(--primary));
    font-size: 1rem;
    font-weight: 500;
}

.statutory-help-text {
    margin: 0.75rem 0 1.5rem;
    color: hsl(218 28% 46%);
    font-size: 1rem;
}

@media (max-width: 991px) {
    .statutory-filter-row {
        grid-template-columns: 1fr;
    }

    .statutory-page-header,
    .statutory-back-row,
    .statutory-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .statutory-primary-btn,
    .statutory-secondary-btn {
        justify-content: center;
    }

    .statutory-form-card,
    .statutory-detail-card,
    .statutory-status-card {
        padding: 1.5rem;
    }
}

.no-icon-padding {
    padding-left: 1rem !important;
}

.statutory-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.statutory-priority-low {
    background: #eef3fa;
    color: #27497c;
}

.statutory-priority-medium {
    background: #fff5e6;
    color: #d18116;
}

.statutory-priority-high {
    background: #fff0ef;
    color: #ff453a;
}

.statutory-badge-pending {
    color: #27497c;
    background: #eef3fa;
    border-color: #bfd0ea;
}
