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

/* ============================================================
   DashDarkX Design System — oc-sample
   ============================================================ */

/* ---------- Theme Variables ---------- */
:root {
    --bg: #F4F7FE;
    --card: #FFFFFF;
    --border: rgba(0,0,0,0.06);
    --border2: rgba(0,0,0,0.08);
    --text: #1B2559;
    --text2: #2B3674;
    --text3: #A3AED0;
    --text4: #A3AED0;
    --text5: #A3AED0;
    --hover: rgba(0,0,0,0.02);
    --hover2: rgba(0,0,0,0.04);
    --hover3: rgba(0,0,0,0.06);
    --input-bg: #F4F7FE;
    --textbox-bg: #FFFFFF;
    --textbox-text: #1B2559;
    --textbox-placeholder: #7180A8;
    --sidebar-bg: #FFFFFF;
    --modal-overlay: rgba(0,0,0,0.4);
    --modal-header-bg: #E9EEFA;
    --modal-footer-bg: #F8FAFF;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --sidebar-width: 260px;
    --purple: #4318FF;
    --purple-hover: #3512D6;
}

[data-theme="dark"] {
    --bg: #0B1437;
    --card: #111C44;
    --border: rgba(255,255,255,0.06);
    --border2: rgba(255,255,255,0.08);
    --text: #fff;
    --text2: rgba(255,255,255,0.65);
    --text3: rgba(255,255,255,0.45);
    --text4: rgba(255,255,255,0.35);
    --text5: rgba(255,255,255,0.4);
    --hover: rgba(255,255,255,0.02);
    --hover2: rgba(255,255,255,0.05);
    --hover3: rgba(255,255,255,0.08);
    --input-bg: #0B1437;
    --textbox-bg: #FFFFFF;
    --textbox-text: #1B2559;
    --textbox-placeholder: #7180A8;
    --sidebar-bg: #111C44;
    --modal-overlay: rgba(0,0,0,0.7);
    --modal-header-bg: #0B1437;
    --modal-footer-bg: #0E183B;
    --shadow: none;
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}
body.modal-dragging { user-select: none; }

a { text-decoration: none; color: inherit; }

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    min-height: 100vh;
    padding: 24px 16px;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s, width 0.3s, padding 0.3s;
}

.sidebar-brand {
    display: flex; align-items: center;
    gap: 12px; padding: 0 12px; margin-bottom: 32px;
}

.sidebar-brand .brand-icon {
    width: 32px; height: 32px;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 14px;
}

.sidebar-brand .brand-text { font-size: 18px; font-weight: 700; color: var(--text); }

.sidebar-section-label {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--text4);
    padding: 0 12px; margin-top: 24px; margin-bottom: 12px;
}

.sidebar-nav {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    list-style: none;
}

.sidebar-nav .nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px;
    font-size: 14px; font-weight: 500;
    color: var(--text2);
    transition: all 0.2s;
    white-space: nowrap;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sidebar-nav .nav-link i { width: 20px; text-align: center; font-size: 16px; flex-shrink: 0; opacity: 0.7; }
.sidebar-nav .nav-link:hover { background: var(--hover2); color: var(--text); }
.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff; font-weight: 600;
}
.sidebar-nav .nav-link.active i { opacity: 1; }

.nav-caret { margin-left: auto; transition: transform .2s ease; font-size: 12px; }
.nav-section.open .nav-caret { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    padding: 2px 0 2px 16px;
    flex-direction: column;
    gap: 2px;
}
.nav-section.open .nav-dropdown-menu { display: flex; }

.nav-sub { padding-left: 14px; font-size: 13px; }
.nav-sub.active {
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 0 0;
    border-top: 1px solid var(--border);
}

.btn-logout {
    width: 100%;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border2);
    border-radius: 10px;
    background: transparent;
    color: var(--text2);
    font-weight: 500; font-size: 14px;
    cursor: pointer;
    transition: all .15s ease;
}
.btn-logout:hover { background: rgba(227,26,26,0.1); border-color: rgba(227,26,26,0.3); color: #E31A1A; }

/* Sidebar collapsed */
body.sidebar-collapsed .sidebar { width: 72px; padding: 24px 8px; }
body.sidebar-collapsed .sidebar-brand .brand-text,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-nav .nav-text,
body.sidebar-collapsed .sidebar-footer span { display: none; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; padding: 0; margin-bottom: 24px; }
body.sidebar-collapsed .sidebar-nav .nav-link { justify-content: center; padding: 10px; }
body.sidebar-collapsed .sidebar-footer .btn-logout span { display: none; }
body.sidebar-collapsed .sidebar-footer .btn-logout { justify-content: center; padding: 10px; }
body.sidebar-collapsed .main { margin-left: 72px; }

.sidebar-close { display: none; }

/* ---------- Main Content ---------- */
.main {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0 32px 24px;
    transition: margin-left 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ---------- Top Header ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    background: var(--bg);
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left h1 { font-size: 22px; font-weight: 700; }
.topbar-left p { font-size: 13px; color: var(--text3); margin-top: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.sidebar-collapse-btn {
    position: absolute; top: 24px; right: 8px;
    width: 28px; height: 28px;
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text3);
    transition: all 0.3s; z-index: 101;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sidebar-collapse-btn svg { width: 16px; height: 16px; transition: transform 0.3s; }
.sidebar-collapse-btn:hover { background: var(--hover3); color: var(--text); }
body.sidebar-collapsed .sidebar-collapse-btn { right: -14px; }
body.sidebar-collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }

/* Search */
.topbar-search { position: relative; }
.topbar-search-form { position: relative; display: flex; align-items: center; }
.topbar-search-input {
    background: var(--textbox-bg); border: 1px solid var(--border2);
    border-radius: 8px; padding: 9px 14px 9px 38px;
    color: var(--textbox-text); font-size: 13px; width: 360px; outline: none;
    transition: border-color 0.2s, background 0.3s;
    font-family: inherit;
}
.topbar-search-input::placeholder { color: var(--textbox-placeholder); }
.topbar-search-input:focus { border-color: #4318FF; }
.topbar-search-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    width: 16px; height: 16px; color: var(--text4); pointer-events: none;
}
.topbar-search-clear {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    border: 0; background: transparent; color: var(--text4);
    width: 24px; height: 24px; border-radius: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 12px;
}
.topbar-search-clear:hover { background: var(--hover3); color: var(--text); }

.topbar-search-results {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    overflow: hidden; max-height: 380px; overflow-y: auto; z-index: 200;
}
[data-theme="light"] .topbar-search-results { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }

.gs-group {
    padding: 8px 14px 4px; font-size: 11px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase; color: var(--text4);
    background: var(--hover);
}
.gs-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; color: var(--text2); border-top: 1px solid var(--border);
    transition: background .12s ease; cursor: pointer;
}
.gs-item:hover { background: var(--hover2); color: var(--purple); }
.gs-icon {
    width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px;
    background: rgba(67,24,255,0.08); color: var(--purple);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
}
.gs-text { flex: 1; min-width: 0; }
.gs-title { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-sub { display: block; font-size: 11px; color: var(--text4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-arrow { color: var(--text4); font-size: 12px; }
.gs-empty { padding: 22px 14px; text-align: center; color: var(--text3); font-size: 13px; }
.gs-empty strong { color: var(--text); }

/* Header buttons */
.header-icon-btn {
    width: 38px; height: 38px;
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text2);
    position: relative; transition: all 0.3s;
}
.header-icon-btn:hover { background: var(--hover3); color: var(--text); }
.header-icon-btn .badge {
    position: absolute; top: -2px; right: -2px;
    width: 16px; height: 16px; background: #E31A1A;
    border-radius: 50%; font-size: 9px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; color: #fff;
}

/* Theme toggle */
.theme-toggle {
    width: 52px; height: 28px;
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 14px;
    display: flex; align-items: center; padding: 3px;
    cursor: pointer; transition: background 0.3s; position: relative;
}
.theme-toggle-knob {
    width: 20px; height: 20px;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    border-radius: 50%; transition: transform 0.3s;
    display: flex; align-items: center; justify-content: center;
}
.theme-toggle-knob svg { width: 12px; height: 12px; color: #fff; }
[data-theme="dark"] .theme-toggle-knob { transform: translateX(24px); }

/* Dropdowns */
.dropdown { position: relative; }
.dropdown-menu {
    display: none; position: absolute;
    top: calc(100% + 8px); right: 0;
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 12px; padding: 6px; min-width: 220px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    z-index: 200; animation: dropdownIn 0.2s ease;
}
[data-theme="light"] .dropdown-menu { box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.dropdown-menu.show { display: block; }
@keyframes dropdownIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    font-size: 13px; color: var(--text2);
    cursor: pointer; transition: all 0.15s;
    border: none; background: none; width: 100%; text-align: left;
}
.dropdown-item:hover { background: var(--hover2); color: var(--text); }
.dropdown-item i { width: 16px; text-align: center; font-size: 14px; opacity: 0.7; }
.dropdown-item.text-danger { color: #E31A1A; }
.dropdown-item.text-danger:hover { background: rgba(227,26,26,0.1); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

.header-avatar { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; cursor: pointer; }

/* ---------- Content ---------- */
.content { padding: 0; width: 100%; }

/* ---------- Page Header ---------- */
.page-header {
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px;
    margin-bottom: 24px; flex-wrap: wrap;
}
.page-title { font-size: 22px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* ---------- Cards ---------- */
.card {
    background: var(--card); border-radius: 16px;
    box-shadow: var(--shadow);
    transition: background 0.3s, box-shadow 0.3s;
}
.card-header {
    border-bottom: 1px solid var(--border);
    padding: 16px 20px;
    background: transparent;
}
.card-body { padding: 20px; }

/* ---------- Stat Cards ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.stat-card {
    background: var(--card); border-radius: 16px; padding: 20px;
    position: relative; overflow: hidden;
    box-shadow: var(--shadow); transition: background 0.3s, box-shadow 0.3s;
}
.stat-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.stat-card-icon { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.stat-card-icon.blue { background: rgba(67,24,255,0.15); color: #7551FF; }
.stat-card-icon.green { background: rgba(44,190,136,0.15); color: #2CBF88; }
.stat-card-icon.orange { background: rgba(255,173,51,0.15); color: #FFAD33; }
.stat-card-icon.pink { background: rgba(227,26,26,0.15); color: #E31A1A; }
.stat-card-icon.purple { background: rgba(67,24,255,0.15); color: #7551FF; }
.stat-card-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; margin-bottom: 4px; }
.stat-card-label { font-size: 13px; color: var(--text3); }
.stat-card-change {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
}
.stat-card-change.positive { background: rgba(44,190,136,0.12); color: #2CBF88; }
.stat-card-change.negative { background: rgba(227,26,26,0.12); color: #E31A1A; }

/* ---------- Tables ---------- */
.table-card { background: var(--card); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); transition: background 0.3s; }
.table-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.table-title { font-size: 16px; font-weight: 700; }
.table-subtitle { font-size: 12px; color: var(--text3); margin-top: 2px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: 12px 16px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text5); border-bottom: 1px solid var(--border);
}
.data-table td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { cursor: pointer; transition: background 0.15s; }
.data-table tbody tr:hover td { background: var(--hover); }

.table-user { display: flex; align-items: center; gap: 10px; }
.table-user img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.table-user .name { font-weight: 600; }
.table-user .email { font-size: 11px; color: var(--text5); }

.table-footer {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border);
}
.table-footer-info { font-size: 12px; color: var(--text3); }

/* ---------- Badges ---------- */
.status-badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-block; }
.status-badge.active, .status-badge.approved { background: rgba(44,190,136,0.12); color: #2CBF88; }
.status-badge.inactive, .status-badge.pending { background: rgba(255,173,51,0.12); color: #FFAD33; }
.status-badge.declined, .status-badge.suspended { background: rgba(227,26,26,0.12); color: #E31A1A; }

.role-badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-block; }
.role-badge.admin { background: rgba(67,24,255,0.12); color: #7551FF; }
.role-badge.editor { background: rgba(43,126,244,0.12); color: #2B7EF4; }
.role-badge.viewer { background: var(--hover2); color: var(--text2); }

.badge-soft-primary { background: rgba(67,24,255,0.12); color: #7551FF; font-weight: 600; }
.badge-soft-success { background: rgba(44,190,136,0.12); color: #2CBF88; font-weight: 600; }
.badge-soft-danger { background: rgba(227,26,26,0.12); color: #E31A1A; font-weight: 600; }
.badge-soft-warning { background: rgba(255,173,51,0.12); color: #FFAD33; font-weight: 600; }
.badge-soft-info { background: rgba(43,126,244,0.12); color: #2B7EF4; font-weight: 600; }
.badge-soft-secondary { background: var(--hover2); color: var(--text2); font-weight: 600; }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; }
.page-btn {
    width: 32px; height: 32px;
    background: transparent; border: 1px solid var(--border2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text3);
    font-size: 12px; font-weight: 500; transition: all 0.2s;
}
.page-btn:hover { border-color: var(--text3); color: var(--text); }
.page-btn.active { background: #4318FF; border-color: #4318FF; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border: none; border-radius: 10px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
    text-decoration: none; line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff;
}
.btn-primary:hover { opacity: 0.9; }
.btn-secondary {
    background: var(--hover2); border: 1px solid var(--border2);
    color: var(--text2);
}
.btn-secondary:hover { background: var(--hover3); color: var(--text); }
.btn-danger {
    background: rgba(227,26,26,0.12); color: #E31A1A;
}
.btn-danger:hover { background: rgba(227,26,26,0.2); }
.btn-success {
    background: rgba(44,190,136,0.12); color: #2CBF88;
}
.btn-success:hover { background: rgba(44,190,136,0.2); }
.btn-light {
    background: var(--hover2); border: 1px solid var(--border2);
    color: var(--text2);
}
.btn-light:hover { background: var(--hover3); color: var(--text); }
.btn-outline-primary {
    background: transparent; border: 1px solid #4318FF; color: #4318FF;
}
.btn-outline-primary:hover { background: rgba(67,24,255,0.08); }
.btn-outline-secondary {
    background: transparent; border: 1px solid var(--border2); color: var(--text2);
}
.btn-outline-secondary:hover { background: var(--hover2); color: var(--text); }
.btn-outline-danger {
    background: transparent; border: 1px solid rgba(227,26,26,0.3); color: #E31A1A;
}
.btn-outline-danger:hover { background: rgba(227,26,26,0.08); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-close {
    width: 32px; height: 32px; border: none; background: var(--hover2);
    border-radius: 8px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text3); font-size: 14px; transition: all 0.2s;
}
.btn-close:hover { background: var(--hover3); color: var(--text); }

/* ---------- Forms ---------- */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text2); }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }

.form-control, .form-input {
    background: var(--textbox-bg); border: 1px solid var(--border2);
    border-radius: 8px; padding: 10px 14px;
    color: var(--textbox-text); font-size: 14px; font-family: inherit;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}
.form-control::placeholder, .form-input::placeholder { color: var(--textbox-placeholder); }
.form-control:focus, .form-input:focus { border-color: #4318FF; box-shadow: 0 0 0 3px rgba(67,24,255,0.1); }

input.form-control,
textarea.form-control,
input.form-input,
textarea.form-input,
.topbar-search-input {
    background-color: #fff !important;
    color: #1B2559;
}
input.form-control:-webkit-autofill,
input.form-input:-webkit-autofill {
    -webkit-text-fill-color: #1B2559;
    box-shadow: 0 0 0 1000px #fff inset;
}

.form-control.is-invalid, .form-input.error { border-color: #E31A1A; }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(227,26,26,0.1); }

.invalid-feedback { font-size: 12px; color: #E31A1A; margin-top: 4px; display: block; }

.form-select {
    background: var(--input-bg); border: 1px solid var(--border2);
    border-radius: 10px; padding: 10px 36px 10px 14px;
    color: var(--text); font-size: 14px; font-family: inherit;
    outline: none; transition: border-color 0.2s; width: 100%;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23A3AED0' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; cursor: pointer;
}
.form-select:focus { border-color: #4318FF; box-shadow: 0 0 0 3px rgba(67,24,255,0.1); }
.form-select option { background: var(--card); color: var(--text); }

.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { flex-shrink: 0; width: 18px; height: 18px; margin: 0; border-radius: 6px; border: 2px solid var(--border2); appearance: none; -webkit-appearance: none; cursor: pointer; position: relative; transition: all 0.2s; background: var(--hover); }
.form-check-input:checked { background: #4318FF; border-color: #4318FF; }
.form-check-input:checked::after { content: ''; position: absolute; left: 5px; top: 2px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.form-check-label { font-size: 14px; color: var(--text2); cursor: pointer; margin: 0; line-height: 1.2; }

.input-group { display: flex; }
.input-group .form-control { border-radius: 0; }
.input-group .form-control:first-child { border-radius: 8px 0 0 8px; }
.input-group .form-control:last-child { border-radius: 0 8px 8px 0; }
.input-group-text {
    display: flex; align-items: center; padding: 0 14px;
    background: var(--hover2); border: 1px solid var(--border2);
    font-size: 13px; color: var(--text3); white-space: nowrap;
}
.input-group-text:first-child { border-radius: 8px 0 0 8px; border-right: none; }
.input-group-text:last-child { border-radius: 0 8px 8px 0; border-left: none; }

/* ---------- Tabs ---------- */
.filter-tabs { display: flex; gap: 4px; background: var(--hover2); border-radius: 8px; padding: 3px; }
.filter-tab {
    padding: 6px 14px; border-radius: 6px;
    font-size: 12px; font-weight: 500; color: var(--text3);
    cursor: pointer; transition: all 0.2s; border: none; background: none;
}
.filter-tab.active { background: #4318FF; color: #fff; }
.filter-tab:hover:not(.active) { color: var(--text); }

.log-type-tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    overflow-x: auto;
    background: var(--hover2);
    border: 1px solid var(--border);
    border-radius: 10px;
    scrollbar-width: thin;
}
.log-type-tab {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 7px;
    color: var(--text3);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.log-type-tab:hover { color: var(--text); background: var(--surface); }
.log-type-tab.active {
    color: var(--text);
    background: var(--surface);
    box-shadow: 0 1px 3px rgba(18, 18, 23, 0.1);
}
.log-type-tab:focus-visible { outline: 2px solid #4318FF; outline-offset: 2px; }
.log-type-count {
    min-width: 22px;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--hover2);
    color: var(--text3);
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
}
.log-type-tab.active .log-type-count { background: rgba(67, 24, 255, 0.11); color: #4318FF; }

/* ---------- Modals ---------- */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: var(--modal-overlay); backdrop-filter: blur(4px);
    z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; animation: modalOverlayIn 0.32s ease-out; }

.modal-content {
    background: var(--card); border: 1px solid var(--border2);
    border-radius: 16px; width: 760px; max-width: calc(100vw - 32px); max-height: calc(100vh - 32px);
    display: flex; flex-direction: column;
    animation: modalIn 0.42s cubic-bezier(.16, 1, .3, 1);
    transform: translate3d(var(--modal-x, 0px), var(--modal-y, 0px), 0);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
[data-theme="light"] .modal-content { box-shadow: 0 20px 60px rgba(0,0,0,0.15); }
.modal-content.modal-lg { width: 1040px; }
.modal-content.modal-xl { width: 1480px; max-width: calc(100vw - 24px); }
.modal-content.modal-sm { width: 560px; }

@keyframes modalOverlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes modalIn {
    from { opacity: 0; filter: blur(3px); transform: translate3d(var(--modal-x, 0px), calc(var(--modal-y, 0px) + 18px), 0) scale(.975); }
    to { opacity: 1; transform: translate3d(var(--modal-x, 0px), var(--modal-y, 0px), 0) scale(1); }
}

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    flex-shrink: 0; background: var(--modal-header-bg);
    border-radius: 15px 15px 0 0; cursor: grab; user-select: none;
}
.modal-header:active { cursor: grabbing; }
.modal-header button, .modal-header a, .modal-header input { cursor: pointer; }
.modal-header h2, .modal-title { font-size: 17px; font-weight: 700; }
.modal-subtitle { font-size: 12px; color: var(--text3); margin-top: 2px; }

.modal-header-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}

.modal-body { padding: 24px; flex: 1; overflow-y: auto; min-height: 0; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

.modal-footer {
    display: flex; align-items: center; justify-content: flex-end; gap: 10px;
    padding: 16px 24px; border-top: 1px solid var(--border);
    flex-shrink: 0; background: var(--modal-footer-bg);
    border-radius: 0 0 15px 15px;
}

/* ---------- Notice / Confirm Modals ---------- */
.app-notice .modal-content, .app-confirm .modal-content { width: 560px; }
.app-notice .modal-body, .app-confirm .modal-body { padding: 28px 24px; text-align: center; }
.app-notice-icon { font-size: 2.2rem; line-height: 1; }
.app-notice-icon-success { color: #2CBF88; }
.app-notice-icon-warning { color: #FFAD33; }
.app-notice-icon-danger { color: #E31A1A; }
.app-notice-message, .app-confirm-message { font-size: 14px; color: var(--text2); font-weight: 500; }

/* ---------- Toast ---------- */
.toast-container {
    position: fixed; bottom: 24px; right: 24px;
    z-index: 2000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: 10px;
    font-size: 13px; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 8px;
    animation: toastIn 0.3s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.toast.success { background: #2CBF88; }
.toast.error { background: #E31A1A; }
.toast.info { background: #4318FF; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Loading ---------- */
.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border2); border-top-color: #4318FF;
    border-radius: 50%; animation: spin 0.7s linear infinite;
    margin: 0 auto 10px;
}
.spinner-border { width: 1.5rem; height: 1.5rem; border: 0.2em solid var(--border2); border-top-color: #4318FF; border-radius: 50%; animation: spin 0.7s linear infinite; display: inline-block; }
.spinner-border-sm { width: 1rem; height: 1rem; border-width: 0.15em; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Alert ---------- */
.alert {
    padding: 14px 18px; border-radius: 12px;
    font-size: 13px; font-weight: 500;
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 20px;
    animation: toastIn 0.3s ease;
}
.alert-success { background: rgba(44,190,136,0.12); color: #2CBF88; }
.alert-danger { background: rgba(227,26,26,0.12); color: #E31A1A; }
.alert-dismissible { position: relative; padding-right: 40px; }
.alert .btn-close { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* ---------- Avatar ---------- */
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff; font-weight: 700; font-size: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }

/* ---------- Plugin Cards ---------- */
.plugin-card { transition: transform .15s ease, box-shadow .15s ease; display: flex; flex-direction: column; }
.plugin-card .card-body { display: flex; flex-direction: column; flex: 1; }
.plugin-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15,23,42,0.12); }
.plugin-card-trashed { opacity: .75; }
.plugin-card-trashed:hover { transform: none; box-shadow: none; }

.plugin-icon {
    width: 62px; height: 62px; border-radius: 24%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px; flex-shrink: 0;
    overflow: hidden; box-shadow: 0 10px 22px rgba(15,23,42,0.25);
}
.plugin-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plugin-icon-lg { width: 72px; height: 72px; font-size: 32px; }
.plugin-name { font-size: 16px; font-weight: 700; }
.plugin-author { font-size: 12px; color: var(--text3); }
.plugin-desc { font-size: 13px; color: var(--text3); }

/* ---------- Detail Block ---------- */
.detail-block {
    background: var(--hover); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px;
}
.detail-label { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; font-size: 11px; color: var(--text3); }

/* ---------- Capability Grid ---------- */
.capability-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2px 16px; max-height: 260px; overflow-y: auto;
    padding: 10px 12px; background: var(--hover);
    border: 1px solid var(--border); border-radius: 12px;
}

/* ---------- Log dots ---------- */
.log-dot { font-size: 6px; }
.log-dot-login { color: #2CBF88; }
.log-dot-logout { color: var(--text4); }
.log-dot-activity { color: #7551FF; }
.log-dot-system { color: #2B7EF4; }
.log-dot-error { color: #E31A1A; }
.log-dot-security { color: #FFAD33; }

/* ---------- List Group ---------- */
.list-group { display: flex; flex-direction: column; }
.list-group-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}
.list-group-item:last-child { border-bottom: none; }
.list-group-item:hover { background: var(--hover); }
.list-group-flush .list-group-item { border-left: 0; border-right: 0; }

/* ---------- Nav Pills ---------- */
.nav-pills { display: flex; gap: 4px; background: var(--hover2); border-radius: 8px; padding: 3px; }
.nav-pills .nav-link {
    padding: 8px 16px; border-radius: 6px;
    font-size: 13px; font-weight: 500; color: var(--text3);
    cursor: pointer; transition: all 0.2s; border: none; background: none;
}
.nav-pills .nav-link.active { background: #4318FF; color: #fff; }
.nav-pills .nav-link:hover:not(.active) { color: var(--text); }

/* ---------- Role Cards ---------- */
.role-card {
    background: var(--card); border-radius: 16px; padding: 20px;
    box-shadow: var(--shadow); transition: background 0.3s;
}

/* ---------- Auth Page ---------- */
.auth-page {
    min-height: 100vh; width: 100%; display: flex;
    background: var(--bg); color: var(--text); overflow: hidden;
}
body:has(.auth-page) { display: block; }

.auth-visual {
    flex: 2; background: linear-gradient(135deg, #0B1437 0%, #111C44 50%, #4318FF 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    padding: 48px 36px; position: relative; overflow: hidden;
}
.auth-visual::before {
    content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
    background: rgba(67,24,255,0.15); top: -100px; right: -100px;
}
.auth-visual::after {
    content: ''; position: absolute; width: 350px; height: 350px; border-radius: 50%;
    background: rgba(44,190,136,0.1); bottom: -80px; left: -80px;
}
.auth-visual-content { position: relative; z-index: 1; text-align: center; max-width: 400px; }
.auth-visual-icon {
    width: 120px; height: 120px; border-radius: 32px;
    background: rgba(255,255,255,0.08); backdrop-filter: blur(20px);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 32px; border: 1px solid rgba(255,255,255,0.1);
    font-size: 48px; color: #fff;
}
.auth-visual h2 { font-size: 28px; font-weight: 700; color: #fff; margin-bottom: 12px; }
.auth-visual p { color: rgba(255,255,255,0.6); font-size: 15px; line-height: 1.6; }

.auth-form-panel {
    flex: 1; display: flex; flex-direction: column; justify-content: center;
    padding: 60px 48px; background: var(--card); position: relative;
}

.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.auth-logo-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 18px;
}
.auth-logo-text { font-size: 22px; font-weight: 700; color: var(--text); }

.auth-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.auth-subtitle { color: var(--text4); font-size: 14px; margin-bottom: 32px; }
.auth-subtitle a { color: var(--purple); font-weight: 500; }
.auth-subtitle a:hover { text-decoration: underline; }

.auth-form .form-group { margin-bottom: 20px; }
.auth-form label { display: block; font-size: 13px; font-weight: 600; color: var(--text3); margin-bottom: 8px; }
.auth-form .form-control {
    width: 100%; padding: 12px 16px; padding-left: 44px;
    border-radius: 8px; border: 1px solid var(--border);
    background: var(--textbox-bg); color: var(--textbox-text); font-size: 14px;
}
.auth-form .form-control:focus { border-color: var(--purple); background: var(--textbox-bg); }
.auth-input-wrap { position: relative; }
.auth-input-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: var(--text4); pointer-events: none;
}
.auth-input-eye {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px; color: var(--text4); cursor: pointer;
    background: none; border: none; padding: 0;
}
.auth-submit {
    width: 100%; padding: 13px 24px; border-radius: 12px; border: none;
    background: linear-gradient(135deg, #4318FF, #6C5DD3); color: #fff;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; margin-bottom: 20px;
}
.auth-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.auth-submit:active { transform: translateY(0); }

.auth-footer { color: var(--text4); font-size: 13px; }

/* ---------- Error Page ---------- */
.error-page {
    min-height: 100vh; width: 100%; display: flex;
    flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 40px; background: var(--bg);
}
.error-code {
    font-size: 140px; font-weight: 800;
    background: linear-gradient(135deg, #4318FF, #E31A1A);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; line-height: 1; margin-bottom: 24px; letter-spacing: -4px;
}
.error-title { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.error-desc { color: var(--text4); font-size: 15px; max-width: 420px; margin-bottom: 36px; line-height: 1.6; }
.error-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 12px;
    background: linear-gradient(135deg, #4318FF, #6C5DD3);
    color: #fff; font-size: 14px; font-weight: 600;
    text-decoration: none; transition: all 0.2s;
}
.error-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ---------- Row highlight animation ---------- */
@keyframes rowHighlight { 0% { background: rgba(67,24,255,0.22); } 70% { background: rgba(67,24,255,0.08); } 100% { background: transparent; } }
tr.row-highlight td { animation: rowHighlight 3.5s ease forwards; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ---------- Utility ---------- */
.d-flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.text-center { text-align: center; }
.text-muted { color: var(--text3) !important; }
.text-danger { color: #E31A1A !important; }
.text-success { color: #2CBF88 !important; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-2 { margin-left: 8px; }
.p-4 { padding: 16px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 24px; padding-bottom: 24px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.pe-3 { padding-right: 12px; }
.ps-3 { padding-left: 12px; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }
.border-0 { border: 0 !important; }
.rounded-pill { border-radius: 50rem !important; }
.small, small { font-size: 12px; }
code { font-size: 12px; background: var(--hover2); padding: 2px 6px; border-radius: 4px; }
.min-w-0 { min-width: 0; }
.position-relative { position: relative; }
.text-violet { color: #7551FF; }
.bg-violet { background-color: #7551FF; }
.fw-bold { font-weight: 700; }

/* Row / Col grid (minimal bootstrap replacement) */
.row { display: flex; flex-wrap: wrap; margin: 0 -10px; }
.row > [class*="col-"] { padding: 0 10px; }
.g-2 > [class*="col-"] { padding: 0 10px 10px; }
.g-3 > [class*="col-"] { padding: 0 10px 10px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-lg-6 { flex: 0 0 50%; max-width: 50%; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-xl-3 { flex: 0 0 25%; max-width: 25%; }
.col-xl-6 { flex: 0 0 50%; max-width: 50%; }
.justify-content-center { justify-content: center; }

.table-responsive { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; padding: 12px 16px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text5); border-bottom: 1px solid var(--border); }
.table td { padding: 14px 16px; font-size: 13px; border-bottom: 1px solid var(--border); }
.table tbody tr:hover td { background: var(--hover); }
.table-hover tbody tr:hover td { background: var(--hover); }
.table-align-middle td { vertical-align: middle; }
.align-middle { vertical-align: middle; }
.mb-0 { margin-bottom: 0; }

/* D-none / D-block */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-grid { display: grid; }

/* Hidden */
[hidden] { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); box-shadow: 0 0 40px rgba(0,0,0,0.3); }
    .sidebar.open { transform: translateX(0); width: 260px; padding: 24px 16px; }
    .sidebar.open .brand-text, .sidebar.open .sidebar-section-label,
    .sidebar.open .nav-text, .sidebar.open .sidebar-footer span { display: block; }
    .sidebar.open .sidebar-brand, .sidebar.open .sidebar-nav .nav-link,
    .sidebar.open .sidebar-footer .btn-logout { justify-content: flex-start; }
    .sidebar-collapse-btn { display: flex; }
    .main { margin-left: 0; padding: 0 16px 24px; }
}

@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .row { flex-direction: column; }
    .row > [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
    .topbar-search-input { width: 260px; }
}
@media (max-width: 576px) {
    .topbar-search { display: none; }
    .modal-overlay { align-items: flex-end; }
    .modal-content, .modal-content.modal-sm, .modal-content.modal-lg, .modal-content.modal-xl {
        width: 100%; max-width: 100%; max-height: calc(100vh - 16px);
        border-radius: 16px 16px 0 0;
        transform: none !important;
    }
    .modal-header { border-radius: 15px 15px 0 0; cursor: default; }
    .modal-footer { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .modal-overlay.open, .modal-content { animation: none; }
}
@media (max-width: 1024px) {
    .auth-visual { display: none; }
    .auth-form-panel { width: 100%; padding: 40px 32px; }
}

/* ---------- Utility classes ---------- */
.d-inline { display: inline !important; }
.d-inline-flex { display: inline-flex !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 12px !important; }
.text-end { text-align: right !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.me-1 { margin-right: 4px !important; }
.me-auto { margin-right: auto !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 12px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 12px !important; }
.mt-4 { margin-top: 16px !important; }
.pe-3 { padding-right: 12px !important; }
.py-4 { padding-top: 16px !important; padding-bottom: 16px !important; }
.py-5 { padding-top: 20px !important; padding-bottom: 20px !important; }
.px-3 { padding-left: 12px !important; padding-right: 12px !important; }
.fw-semibold { font-weight: 600 !important; }
.small { font-size: 12px !important; }
.flex-grow-1 { flex-grow: 1 !important; }
.min-w-0 { min-width: 0 !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }

.row {
    display: flex; flex-wrap: wrap; margin: 0 -8px;
}
.row > [class*="col-"] { padding: 0 8px; }
.col-12 { flex: 0 0 100%; max-width: 100%; }
.col-sm-6 { flex: 0 0 50%; max-width: 50%; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.col-xl-3 { flex: 0 0 25%; max-width: 25%; }
.col-xl-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-md-2 { flex: 0 0 16.667%; max-width: 16.667%; }
.col-md-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.g-3 > * { margin-bottom: 12px; }

/* Fix action column buttons inline */
td.text-end form.d-inline {
    display: inline;
}
td.text-end .btn + form.d-inline,
td.text-end form.d-inline + .btn,
td.text-end form.d-inline + form.d-inline {
    margin-left: 4px;
}
td.text-end .btn + .btn {
    margin-left: 4px;
}
