/* --- SYSTEM VARIABLES --- */
:root {
    /* Fonts */
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Inter', sans-serif;
    --font-serif: 'Times New Roman', Times, serif;

    /* Theme colors: Red & Gold/Yellow (Đảng bộ / HĐND Bến Thành style) */
    --primary: #e40014;
    /* Red */
    --primary-light: #fb2c36;
    /* Bright Red */
    --primary-gradient: linear-gradient(135deg, #9f0712 0%, #e40014 100%);
    --secondary: #dd7400;
    /* Gold */
    --secondary-gradient: linear-gradient(135deg, #dd7400 0%, #fcbb00 100%);

    --success: #10b981;
    /* Emerald Green */
    --warning: #fcbb00;
    /* Gold/Yellow */
    --danger: #e40014;
    /* Red */
    --info: #0284c7;
    /* Sky Blue */

    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Locked Light Mode values */
    --bg-app: #f8fafc;
    --bg-sidebar: rgba(255, 255, 255, 0.9);
    --bg-card: #ffffff;
    --bg-card-hover: rgba(255, 255, 255, 0.96);
    --bg-input: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --glass-shadow: 0 8px 32px 0 rgba(166, 0, 0, 0.05), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
    --glass-border: 1px solid rgba(0, 0, 0, 0.06);
    --active-item-bg: rgba(228, 0, 20, 0.06);
    --scrollbar-thumb: rgba(0, 0, 0, 0.15);
    --scrollbar-track: rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-app);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(228, 0, 20, 0.5);
}

/* App Container Layout */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.app-body-content {
    display: flex;
    flex-grow: 1;
    width: 100%;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: fixed;
    height: calc(100vh - 80px);
    left: 0;
    top: 80px;
    z-index: 90;
    transition: var(--transition-smooth);
}

.header-brand-container {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    width: auto;
    flex-shrink: 0;
}

.brand-logo {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.logo-icon {
    width: 24px;
    height: 24px;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.header-brand-container .brand-text h1 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff !important;
    line-height: 1.25;
}

.header-brand-container .brand-text span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.825rem;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
    border: 1px solid transparent;
}

.nav-item i {
    width: 18px;
    height: 18px;
    transition: var(--transition-smooth);
}

.nav-item:hover {
    color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 20px;
}

.nav-item.active {
    color: #ffffff;
    background: var(--primary-gradient);
    box-shadow: 0 4px 15px rgba(159, 7, 18, 0.25);
    font-weight: 600;
}

html[data-theme="light"] .nav-item.active {
    color: #ffffff;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: var(--glass-border);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--secondary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.3);
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

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

/* --- MAIN WRAPPER & HEADER --- */
.main-wrapper {
    flex-grow: 1;
    margin-left: 280px;
    min-height: calc(100vh - 80px);
    padding-top: 80px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
}

.app-header {
    height: 80px;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--primary-gradient);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: var(--transition-smooth);
    color: #ffffff;
}

.header-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 24px;
    flex-shrink: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-grow: 1;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 6px;
}

.page-title-area {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.page-title-area h2 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.page-title-area p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.datetime-widget {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.datetime-widget .divider {
    color: rgba(255, 255, 255, 0.4);
}

.theme-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: var(--glass-border);
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.05);
    background-color: var(--bg-card-hover);
}

.theme-toggle-btn i {
    width: 20px;
    height: 20px;
}

/* Toggle icon display based on theme */
html[data-theme="dark"] .sun-icon {
    display: block;
}

html[data-theme="dark"] .moon-icon {
    display: none;
}

html[data-theme="light"] .sun-icon {
    display: none;
}

html[data-theme="light"] .moon-icon {
    display: block;
}

/* --- CONTENT AREA & DASHBOARD --- */
.app-content {
    padding: 10px 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeIn 0.4s ease;
}

/* Dashboard Summary Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon-wrapper.primary {
    background: rgba(228, 0, 20, 0.1);
    color: var(--primary-light);
}

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

.stat-icon-wrapper.warning {
    background: rgba(217, 119, 6, 0.1);
    color: var(--warning);
}

.stat-icon-wrapper.info {
    background: rgba(2, 132, 199, 0.1);
    color: var(--info);
}

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

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.015);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: var(--transition-smooth);
}

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

.panel-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-title i {
    color: var(--primary-light);
    width: 20px;
    height: 20px;
}

/* SVG Chart styling */
.chart-container {
    height: 260px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-bar {
    transition: height 0.5s ease, y 0.5s ease;
    cursor: pointer;
}

.chart-bar:hover {
    fill-opacity: 0.95;
    filter: drop-shadow(0px 4px 8px rgba(228, 0, 20, 0.3));
}

.chart-tooltip {
    position: absolute;
    background: #0f172a;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Activities list */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.activity-dot.primary {
    background: var(--primary-light);
}

.activity-dot.success {
    background: var(--success);
}

.activity-dot.warning {
    background: var(--warning);
}

.activity-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-text {
    font-size: 0.85rem;
    font-weight: 500;
}

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

/* Quick Action Banner */
.action-banner {
    background: linear-gradient(135deg, rgba(159, 7, 18, 0.85) 0%, rgba(221, 116, 0, 0.85) 100%), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%23fff" fill-opacity="0.03" width="100" height="100"/></svg>');
    color: #ffffff;
    padding: 32px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(159, 7, 18, 0.15);
    gap: 20px;
}

.action-banner-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.action-banner-text h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.action-banner-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Buttons style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: 1px solid transparent;
    text-decoration: none;
}

.btn-primary {
    background: #ffffff;
    color: var(--primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-accent {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(228, 0, 20, 0.3);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(228, 0, 20, 0.4);
}

.btn-success {
    background: var(--success);
    color: #ffffff;
}

.btn-success:hover {
    background: #0e9f6e;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-input);
    border: var(--glass-border);
    color: var(--text-main);
}

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

.btn-sm {
    padding: 0 12px;
    height: 32px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
}

/* --- ORG CHART COMPONENT --- */
.org-chart-view {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.org-navigation-tabs {
    display: flex;
    background: var(--bg-card);
    border: var(--glass-border);
    padding: 6px;
    border-radius: 30px;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: var(--glass-shadow);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition-smooth);
}

.tab-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(159, 7, 18, 0.2);
}

/* Tree visualization */
.tree-container {
    padding: 20px 0;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-root {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-level {
    display: flex;
    justify-content: center;
    gap: 0;
    position: relative;
    padding-top: 30px;
}

/* Parent vertical connector */
.tree-level::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: var(--primary-light);
    opacity: 0.5;
    z-index: 1;
}

.tree-node-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 15px 20px 0 20px;
}

/* Child vertical connector */
.tree-node-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 15px;
    background: var(--primary-light);
    opacity: 0.5;
    z-index: 1;
}

/* Horizontal connector line */
.tree-node-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-light);
    opacity: 0.5;
    z-index: 0;
}

/* Restrict horizontal line to start at 50% for first child */
.tree-node-wrapper:first-child::after {
    left: 50%;
    width: 50%;
}

/* Restrict horizontal line to end at 50% for last child */
.tree-node-wrapper:last-child::after {
    width: 50%;
}

/* Hide horizontal line if only one child */
.tree-node-wrapper:only-child::after {
    display: none;
}

.tree-node {
    background: var(--bg-card);
    border: var(--glass-border);
    border-left: 5px solid var(--primary-light);
    padding: 18px 24px;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-align: center;
    min-width: 200px;
    max-width: 280px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
}

.tree-node:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 20px rgba(159, 7, 18, 0.15);
    border-left-color: var(--secondary);
}

.tree-node h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.tree-node p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Node coloring by type */
.node-level-1 {
    border-left-color: var(--warning);
}

.node-level-2 {
    border-left-color: var(--primary-light);
}

.node-level-3 {
    border-left-color: var(--secondary);
}

/* Detail Drawer/Card for selected Node */
.node-detail-panel {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--glass-shadow);
    display: none;
    animation: slideUp 0.3s ease;
}

.node-detail-panel.active {
    display: block;
}

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

.detail-header h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
}

.detail-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-meta-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-meta-item span {
    font-size: 0.9rem;
    font-weight: 500;
}

.detail-body h5 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.detail-body p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* --- DOCUMENT HUB COMPONENT --- */
.doc-hub-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.search-filter-box {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    max-width: 800px;
}

.search-input-wrapper {
    position: relative;
    flex-grow: 2;
    min-width: 220px;
}

.search-input-wrapper i,
.search-input-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 42px;
    background: var(--bg-input);
    border: var(--glass-border);
    padding: 0 14px 0 42px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 10px rgba(228, 0, 20, 0.15);
}

.filter-select {
    background: var(--bg-input);
    border: var(--glass-border);
    height: 42px;
    padding: 0 30px 0 14px;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    min-width: 150px;
    transition: var(--transition-smooth);
}

.filter-select:focus {
    border-color: var(--primary-light);
}

/* Document Table and List cards */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.doc-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    position: relative;
}

.doc-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.doc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.doc-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.doc-badge.nq {
    background: rgba(228, 0, 20, 0.15);
    color: var(--primary-light);
}

.doc-badge.tb {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.doc-badge.kh {
    background: rgba(217, 119, 6, 0.15);
    color: var(--warning);
}

.doc-badge.bc {
    background: rgba(2, 132, 199, 0.15);
    color: var(--info);
}

.doc-badge.other {
    background: rgba(156, 163, 175, 0.15);
    color: var(--text-muted);
}

.doc-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.doc-status.draft {
    background: var(--text-muted);
}

.doc-status.signed {
    background: var(--success);
}

.doc-status.published {
    background: var(--primary-light);
}

.doc-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doc-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.doc-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.doc-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.doc-card-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- DOCUMENT GENERATOR --- */
.generator-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .generator-layout {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
}

.form-control {
    background: var(--bg-input);
    border: var(--glass-border);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 8px rgba(228, 0, 20, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Document Live Preview Frame (Nghị định 30 style) */
.document-preview-container {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.preview-toolbar h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
}

.preview-scroll {
    overflow-y: auto;
    max-height: 600px;
    padding-right: 4px;
}

.paper-sheet {
    background: #ffffff;
    color: #000000;
    padding: 40px;
    font-family: var(--font-serif);
    line-height: 1.4;
    font-size: 13px;
    /* Standard A4 equivalent */
    min-height: 600px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    border-radius: 4px;
}

/* Official VN administrative style formatting */
.gov-header {
    display: grid;
    grid-template-columns: 1.2fr 1.8fr;
    text-align: center;
    margin-bottom: 30px;
}

.gov-issuer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gov-issuer .level-1 {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.gov-issuer .level-2 {
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: underline;
}

.gov-issuer .doc-number {
    font-size: 11px;
    margin-top: 4px;
}

.gov-motto {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gov-motto .country {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.gov-motto .slogan {
    font-size: 11px;
    font-weight: bold;
}

.gov-motto .underline {
    width: 120px;
    height: 1px;
    background: #000000;
    margin-top: 4px;
}

.gov-date {
    font-style: italic;
    font-size: 11px;
    text-align: right;
    margin-top: 15px;
    grid-column: 1 / span 2;
}

.gov-title-area {
    text-align: center;
    margin: 30px 0 20px 0;
}

.gov-title-area h3 {
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.5;
}

.gov-title-area p.summary {
    font-size: 12px;
    font-weight: bold;
    font-style: italic;
}

.gov-body {
    text-align: justify;
}

.gov-body p {
    margin-bottom: 10px;
    text-indent: 1.5cm;
    /* Standard indent */
}

.gov-body .bases {
    font-style: italic;
    margin-bottom: 15px;
}

.gov-body .bases p {
    text-indent: 0;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
}

.gov-body .bases p::before {
    content: '-';
    position: absolute;
    left: 5px;
}

.gov-body h4.article-title {
    font-weight: bold;
    margin: 12px 0 6px 0;
}

.gov-signer-section {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr;
    margin-top: 40px;
}

.gov-recipients {
    font-size: 10px;
    line-height: 1.3;
}

.gov-recipients h5 {
    font-weight: bold;
}

.gov-recipients ul {
    list-style-type: none;
    padding-left: 10px;
}

.gov-recipients li::before {
    content: '- ';
}

.gov-signer {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gov-signer .role {
    font-weight: bold;
    text-transform: uppercase;
}

.gov-signer .stamp-area {
    height: 80px;
    position: relative;
    width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stamp-mockup {
    width: 76px;
    height: 76px;
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 50%;
    color: rgba(220, 38, 38, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 6px;
    font-weight: bold;
    text-transform: uppercase;
    transform: rotate(-10deg);
    position: absolute;
    pointer-events: none;
    text-align: center;
}

.gov-signer .name {
    font-weight: bold;
    margin-top: 10px;
}

/* --- SESSIONS MANAGER COMPONENT --- */
.sessions-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.session-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.session-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--glass-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    cursor: pointer;
}

.session-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.session-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.session-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.session-status.upcoming {
    background: rgba(217, 119, 6, 0.15);
    color: var(--warning);
}

.session-status.ongoing {
    background: rgba(228, 0, 20, 0.15);
    color: var(--primary-light);
}

.session-status.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.session-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
}

.session-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.session-meta div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
}

.progress-bar-bg {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Detail workspace for a Session */
.session-detail-workspace {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 30px;
    animation: fadeIn 0.4s ease;
}

@media (max-width: 1024px) {
    .session-detail-workspace {
        grid-template-columns: 1fr;
    }
}

.checklist-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checklist-item {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: var(--transition-smooth);
}

.checklist-item:hover {
    background: var(--bg-card-hover);
}

.checklist-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checklist-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    transition: var(--transition-smooth);
    background: none;
}

.checklist-checkbox.checked {
    background: var(--success);
    border-color: var(--success);
    color: #ffffff;
}

.checklist-checkbox i {
    width: 14px;
    height: 14px;
}

.checklist-text {
    display: flex;
    flex-direction: column;
}

.checklist-title {
    font-size: 0.85rem;
    font-weight: 600;
}

.checklist-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* --- TOAST SYSTEM --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
}

.toast {
    background: #1e293b;
    border-left: 4px solid var(--primary-light);
    color: #ffffff;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    transform: translateY(20px);
    opacity: 0;
    animation: toastIn 0.3s forwards;
    font-size: 0.85rem;
}

.toast.success {
    border-left-color: var(--success);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.danger {
    border-left-color: var(--danger);
}

/* --- MODAL SYSTEM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

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

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        top: 80px;
        height: calc(100vh - 80px);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
        padding-top: 80px;
        min-height: calc(100vh - 80px);
    }

    .header-brand-container {
        display: flex !important;
        order: 2;
        flex-grow: 1;
        align-items: center;
        gap: 8px;
    }

    .header-brand-container .brand-logo {
        width: 32px !important;
        height: 32px !important;
    }

    .header-brand-container .brand-text h1 {
        font-size: 0.72rem !important;
        letter-spacing: 0.1px !important;
        white-space: nowrap;
    }

    .header-brand-container .brand-text span {
        font-size: 0.6rem !important;
        white-space: nowrap;
    }

    .header-left {
        order: 1;
        margin-right: 8px;
        flex-grow: 0;
    }

    .header-right {
        order: 3;
    }

    .header-divider {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .app-header {
        padding: 0 16px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
    }

    .page-title-area {
        padding: 16px 20px;
    }
}

@media (max-width: 576px) {
    .datetime-widget {
        display: none !important;
    }

    .app-content {
        padding: 20px;
    }

    .gov-header {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .gov-motto {
        border-top: 1px dashed #cccccc;
        padding-top: 10px;
    }

    .gov-signer-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* --- PRINT MEDIA STYLES --- */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
    }

    .sidebar,
    .app-header,
    .preview-toolbar,
    .btn,
    .toast-container,
    .modal-overlay,
    .generator-layout> :not(.document-preview-container),
    .document-preview-container> :not(.preview-scroll) {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .app-content {
        padding: 0 !important;
    }

    .document-preview-container {
        position: relative !important;
        top: 0 !important;
        border: none !important;
        background: none !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .preview-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
    }

    .paper-sheet {
        box-shadow: none !important;
        padding: 0 !important;
        min-height: auto !important;
    }

}

/* --- USER MANAGEMENT & PERMISSIONS STYLES --- */
.users-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Users Table styles */
.users-table-container {
    overflow-x: auto;
    width: 100%;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.users-table th {
    background: var(--bg-input);
    color: var(--text-main);
    font-weight: 700;
    padding: 10px 16px;
    border-bottom: 2px solid var(--border-color);
}

.users-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.users-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .users-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.users-table .avatar-sm {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

/* User switcher control inside table */
.user-group-select {
    background: var(--bg-input);
    border: var(--glass-border);
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.8rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

.user-group-select:focus {
    border-color: var(--primary-light);
}

/* Permissions Matrix styling */
.permission-matrix-card {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-input);
    border: var(--glass-border);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.perm-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.perm-row-left i {
    width: 18px;
    height: 18px;
    color: var(--primary-light);
}

.perm-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.perm-status-badge.allow {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.perm-status-badge.deny {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Sidebar hidden nav items animation */
.nav-item.hidden {
    display: none !important;
}

.user-switcher-container select {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* --- STATUS TABS COMPONENT --- */
.status-tabs-wrapper {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
    margin-top: 15px;
    margin-bottom: 10px;
    width: 100%;
}

.status-tab {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

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

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

.status-tab .tab-count {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    transition: var(--transition-fast);
}

.status-tab.active .tab-count {
    background: var(--active-item-bg);
    color: var(--primary);
}

/* --- PAGINATION COMPONENT --- */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 15px;
    width: 100%;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: var(--glass-border);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.pagination-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-light);
    color: var(--primary);
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: var(--primary-gradient);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 10px rgba(228, 0, 20, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    border-color: var(--border-color);
    background: var(--bg-app);
    color: var(--text-muted);
}

/* --- LOGIN SCREEN OVERLAY --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-card {
    background: var(--bg-card);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeIn 0.4s ease;
}

.login-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.login-logo {
    width: 60px;
    height: 60px;
    background: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.logo-icon-lg {
    width: 32px;
    height: 32px;
}

.login-header h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.login-header p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

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

.login-footer {
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.logout-btn:hover {
    background-color: var(--active-item-bg) !important;
    transform: scale(1.05);
}

/* --- SIGNERS & ROLES DIRECTORIES STYLES --- */
.directory-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: start;
}

.directory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    width: 100%;
}

.directory-table-container {
    overflow-x: auto;
    width: 100%;
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
}

.directory-table th {
    background: var(--bg-input);
    color: var(--text-main);
    font-weight: 700;
    padding: 10px 16px;
    border-bottom: 2px solid var(--border-color);
}

.directory-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.directory-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="light"] .directory-table tr:hover {
    background: rgba(0, 0, 0, 0.01);
}

.action-btn-group {
    display: flex;
    gap: 8px;
}

.app-footer-layout {
    margin-top: auto;
    padding: 20px 60px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .app-footer-layout {
        padding: 16px 20px;
        flex-direction: column;
        text-align: center;
        gap: 6px;
    }
}

/* --- MODAL TAB SYSTEM & PASSWORD TOGGLE --- */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    gap: 8px;
    padding-bottom: 2px;
}

.modal-tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

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

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

.modal-tab-content {
    display: none;
    flex-direction: column;
    gap: 16px;
}

.modal-tab-content.active {
    display: flex;
    animation: fadeInTab 0.25s ease;
}

.password-toggle-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-toggle-wrapper .form-control {
    padding-right: 40px;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
}

.password-toggle-btn:hover {
    color: var(--text-main);
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-doc-item {
    transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.modal-doc-item:hover {
    background-color: var(--active-item-bg);
    border-color: var(--primary-light) !important;
}