
:root {
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --sidebar-text: #9ca3af;
    --sidebar-active: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --success: #16a34a;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 258px;
    min-height: 100vh;
    background: var(--sidebar);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
}

.brand {
    height: 82px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 25px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    color: white;
}

.brand-name {
    color: white;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .08em;
}

.brand-product {
    color: #60a5fa;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    margin-top: 2px;
}

.sidebar-section-title,
.nav-group-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    color: #6b7280;
}

.sidebar-section-title {
    padding: 25px 22px 10px;
}

.nav-group-title {
    padding: 18px 22px 7px;
}

.sidebar-nav {
    padding: 0 10px;
    overflow-y: auto;
}

.nav-item {
    min-height: 40px;
    padding: 0 12px;
    margin: 2px 0;
    color: var(--sidebar-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13px;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: #1e293b;
    color: white;
    border-left-color: #60a5fa;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.nav-badge {
    margin-left: auto;
    font-size: 9px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 22px;
    border-top: 1px solid rgba(255,255,255,.07);
}

.environment-label {
    font-size: 9px;
    letter-spacing: .14em;
    color: #6b7280;
    margin-bottom: 7px;
}

.environment-value {
    font-size: 12px;
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 7px;
}

.status-dot {
    width: 7px;
    height: 7px;
    display: inline-block;
    border-radius: 50%;
    background: var(--success);
}

.main-area {
    margin-left: 258px;
    width: calc(100% - 258px);
    min-height: 100vh;
}

.topbar {
    height: 82px;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 0 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.breadcrumb {
    color: #9ca3af;
    font-size: 11px;
    margin-bottom: 5px;
}

.topbar h1 {
    font-size: 20px;
    margin: 0;
    font-weight: 700;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.system-status {
    font-size: 11px;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 7px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
}

.avatar {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1e293b;
    color: white;
    font-weight: 700;
    font-size: 13px;
}

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

.user-info strong {
    font-size: 12px;
}

.user-info span {
    font-size: 10px;
    color: var(--muted);
}

.chevron {
    color: #9ca3af;
}

.content {
    padding: 34px;
    max-width: 1600px;
}

.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 30px;
}

.eyebrow {
    color: var(--primary);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    margin-bottom: 8px;
}

.welcome-row h2 {
    margin: 0 0 8px;
    font-size: 27px;
    letter-spacing: -.02em;
}

.welcome-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    max-width: 720px;
    line-height: 1.6;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
}

.btn {
    border: 1px solid var(--border);
    padding: 10px 15px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: #374151;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 34px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    padding: 22px;
}

.stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    color: #6b7280;
}

.stat-icon {
    color: var(--primary);
    font-size: 19px;
}

.stat-value {
    font-size: 30px;
    font-weight: 750;
    margin-top: 16px;
    letter-spacing: -.03em;
}

.stat-description {
    color: #9ca3af;
    font-size: 11px;
    margin-top: 5px;
}

.section-heading {
    margin-bottom: 15px;
}

.section-heading h3,
.architecture-panel h3 {
    margin: 0;
    font-size: 18px;
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.platform-card {
    background: white;
    border: 1px solid var(--border);
    padding: 22px;
}

.platform-number {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 22px;
}

.platform-card h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.platform-card p {
    min-height: 42px;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

.card-footer {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 13px;
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 10px;
}

.arrow {
    color: var(--primary);
    font-size: 16px;
}

.architecture-panel {
    margin-top: 30px;
    background: #111827;
    color: white;
    padding: 25px;
}

.architecture-panel .eyebrow {
    color: #60a5fa;
}

.flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.flow-item {
    border: 1px solid #374151;
    background: #1f2937;
    min-width: 125px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flow-number {
    color: #60a5fa;
    font-size: 10px;
    font-weight: 800;
}

.flow-item strong {
    font-size: 12px;
}

.flow-arrow {
    color: #64748b;
}

@media (max-width: 1100px) {
    .stats-grid,
    .platform-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .sidebar {
        width: 220px;
    }

    .main-area {
        margin-left: 220px;
        width: calc(100% - 220px);
    }

    .topbar-right .system-status,
    .user-info,
    .chevron {
        display: none;
    }

    .welcome-row {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .sidebar {
        display: none;
    }

    .main-area {
        margin-left: 0;
        width: 100%;
    }

    .content {
        padding: 20px;
    }

    .stats-grid,
    .platform-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        padding: 0 20px;
    }

    .dashboard-actions {
        width: 100%;
    }

    .btn {
        flex: 1;
    }
}

/* =========================================================
   WEBITTRIO ONE - Tenant Form
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 28px;
}

.form-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.form-group label span {
    color: #dc3545;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    background: #ffffff;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
    box-sizing: border-box;
}

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

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b9c2d0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
    background: #ffffff;
}

.form-group select {
    cursor: pointer;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #7a8494;
    font-size: 12px;
    line-height: 1.5;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    border-bottom: 1px solid #e5e9f0;
}

.card-header h2 {
    margin: 0;
    color: #172033;
    font-size: 18px;
    font-weight: 750;
}

.card-header p {
    margin: 5px 0 0;
    color: #7a8494;
    font-size: 13px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
    transition: all .15s ease;
}

.btn-primary {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    border-color: #d8dee8;
    color: #344054;
}

.btn-secondary:hover {
    background: #f8fafc;
    border-color: #c5ccd8;
    color: #172033;
}

.alert {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 13px;
}

.alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.alert-danger {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Keep the create form visually contained on wide screens */
.page-header + form .card {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px;
    }

    .card-header {
        padding: 20px 22px;
    }
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

    .page-header {
        gap: 15px;
    }
}


/* =========================================================
   WEBITTRIO ONE - Enterprise Data Tables
   ========================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-top: 1px solid #e5e9f0;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1050px;
    font-size: 13px;
}

.data-table thead th {
    padding: 13px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e9f0;
    color: #667085;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody td {
    padding: 17px 18px;
    border-bottom: 1px solid #edf0f4;
    background: #ffffff;
    color: #344054;
    vertical-align: middle;
    white-space: nowrap;
}

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

.data-table tbody tr:hover td {
    background: #f8fafc;
}

.table-primary {
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.table-secondary {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 12px;
}

.code-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #dbe4f3;
    border-radius: 6px;
    background: #f4f7fb;
    color: #344054;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 650;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.status-success {
    background: #ecfdf3;
    color: #027a48;
}

.status-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.status-muted {
    background: #f2f4f7;
    color: #667085;
}

.status-danger {
    background: #fef3f2;
    color: #b42318;
}

.table-meta {
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.empty-state {
    padding: 70px 20px;
    text-align: center;
}

.empty-icon {
    margin-bottom: 15px;
    font-size: 30px;
}

.empty-state h3 {
    margin: 0;
    color: #172033;
    font-size: 18px;
}

.empty-state p {
    margin: 8px 0 20px;
    color: #667085;
    font-size: 13px;
}

.pagination-wrapper {
    padding: 18px 22px;
    border-top: 1px solid #e5e9f0;
}

/* Tenant page header spacing */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 24px;
}

.page-header .eyebrow {
    margin-bottom: 8px;
}

.page-header h1 {
    margin: 0;
    color: #172033;
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.page-subtitle {
    margin: 8px 0 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}

.page-header .btn {
    flex-shrink: 0;
    margin-top: 4px;
}

@media (max-width: 800px) {
    .page-header {
        flex-direction: column;
    }

    .page-header .btn {
        width: 100%;
    }
}


.table-link {
    color: #172033;
    text-decoration: none;
    transition: color .15s ease;
}

.table-link:hover {
    color: #2563eb;
    text-decoration: none;
}


/* =========================================================
   TENANT OVERVIEW - ENTERPRISE UI
   ========================================================= */

.tenant-page {
    max-width: 1440px;
}

.tenant-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.tenant-title-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.tenant-title-avatar {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #172033;
    color: #ffffff;
    font-size: 19px;
    font-weight: 750;
}

.tenant-title-row h1 {
    margin: 0;
    color: #172033;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.tenant-title-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 8px;
}

.tenant-page-header .page-subtitle {
    margin-left: 65px;
}

.tenant-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tenant-summary-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 112px;
    padding: 20px;
    border: 1px solid #e1e6ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.summary-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 14px;
    font-weight: 750;
}

.summary-label {
    color: #98a2b3;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: .08em;
}

.summary-value {
    margin-top: 5px;
    color: #172033;
    font-size: 16px;
    font-weight: 700;
}

.summary-description {
    margin-top: 3px;
    color: #98a2b3;
    font-size: 11px;
}

.tenant-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(350px, .85fr);
    gap: 20px;
}

.tenant-panel {
    overflow: hidden;
    border: 1px solid #e1e6ee;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}

.tenant-panel-header {
    padding: 20px 22px;
    border-bottom: 1px solid #e5e9f0;
}

.tenant-panel-header h2 {
    margin: 0;
    color: #172033;
    font-size: 17px;
    font-weight: 750;
}

.tenant-panel-header p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 12px;
}

.tenant-admin-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tenant-admin-item {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 82px;
    padding: 16px 20px;
    border-bottom: 1px solid #edf0f4;
    color: inherit;
    text-decoration: none;
    transition: background .15s ease;
}

.tenant-admin-item:nth-child(odd) {
    border-right: 1px solid #edf0f4;
}

.tenant-admin-item:hover {
    background: #f8fafc;
}

.tenant-admin-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f1f5f9;
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

.tenant-admin-content {
    min-width: 0;
    flex: 1;
}

.tenant-admin-content strong {
    display: block;
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.tenant-admin-content span {
    display: block;
    margin-top: 4px;
    color: #98a2b3;
    font-size: 11px;
}

.tenant-admin-arrow {
    color: #98a2b3;
    font-size: 20px;
    line-height: 1;
}

.environment-list {
    padding: 4px 22px 12px;
}

.environment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 54px;
    border-bottom: 1px solid #edf0f4;
}

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

.environment-row span {
    color: #667085;
    font-size: 12px;
}

.environment-row strong {
    max-width: 58%;
    overflow: hidden;
    color: #172033;
    font-size: 12px;
    font-weight: 650;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .tenant-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tenant-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .tenant-page-header {
        flex-direction: column;
    }

    .tenant-page-header .btn {
        width: 100%;
    }

    .tenant-summary-grid {
        grid-template-columns: 1fr;
    }

    .tenant-admin-list {
        grid-template-columns: 1fr;
    }

    .tenant-admin-item:nth-child(odd) {
        border-right: 0;
    }

    .tenant-page-header .page-subtitle {
        margin-left: 0;
    }
}


/* =========================================================
   WEBITTRIO ONE - PLATFORM LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;
    margin: 0;
    background: #f5f7fa;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
        BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-shell {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 70px 24px 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.login-logo {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #172033;
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
}

.login-brand-name {
    color: #172033;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .08em;
}

.login-brand-product {
    margin-top: 1px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .18em;
}

.login-card {
    padding: 32px;
    border: 1px solid #e1e6ee;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(16, 24, 40, .07);
}

.login-header {
    margin-bottom: 27px;
}

.login-eyebrow {
    margin-bottom: 9px;
    color: #2563eb;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}

.login-header h1 {
    margin: 0;
    color: #172033;
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -.02em;
}

.login-header p {
    margin: 7px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.5;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 13px;
    font-weight: 650;
}

.login-field input[type="email"],
.login-field input[type="password"] {
    width: 100%;
    height: 45px;
    padding: 10px 13px;
    box-sizing: border-box;
    border: 1px solid #d8dee8;
    border-radius: 7px;
    outline: none;
    background: #ffffff;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
}

.login-field input::placeholder {
    color: #98a2b3;
}

.login-field input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.login-options {
    margin: -2px 0 22px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #667085;
    font-size: 12px;
    cursor: pointer;
}

.remember-option input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #2563eb;
}

.login-submit {
    width: 100%;
    height: 45px;
    border: 0;
    border-radius: 7px;
    background: #2563eb;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease;
}

.login-submit:hover {
    background: #1d4ed8;
}

.login-error {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 7px;
    background: #fff5f5;
    color: #991b1b;
    font-size: 12px;
    line-height: 1.5;
}

.login-error strong {
    display: block;
    margin-bottom: 3px;
}

.login-footer {
    margin-top: 22px;
    color: #98a2b3;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 520px) {
    .login-shell {
        padding: 40px 16px 25px;
    }

    .login-card {
        padding: 24px;
    }
}


/* =========================================================
   AUTHENTICATED USER / LOGOUT
   ========================================================= */

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

.user-info {
    min-width: 0;
}

.user-info strong,
.user-info span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-info strong {
    color: #172033;
    font-size: 13px;
    font-weight: 700;
}

.user-info span {
    margin-top: 2px;
    color: #7b8497;
    font-size: 11px;
}

.logout-form {
    margin-left: 8px;
}

.logout-button {
    border: 1px solid #d9deea;
    background: #ffffff;
    color: #4b5568;
    border-radius: 8px;
    padding: 8px 13px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-button:hover {
    border-color: #c7cedc;
    background: #f7f8fb;
    color: #172033;
}

@media (max-width: 900px) {
    .user-info {
        display: none;
    }

    .logout-form {
        margin-left: 4px;
    }
}


/* =========================================================
   WEBITTRIO ONE - RESPONSIVE MOBILE NAVIGATION
   ========================================================= */

.mobile-header {
    display: none;
}

.mobile-overlay {
    display: none;
}

.mobile-sidebar-close {
    display: none;
}

.mobile-menu-button {
    display: none;
}

@media (max-width: 900px) {

    body {
        overflow-x: hidden;
    }

    /* Mobile header */
    .mobile-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        z-index: 3000;
        display: flex;
        align-items: center;
        padding: 0 14px;
        background: #ffffff;
        border-bottom: 1px solid #e5e7eb;
        box-shadow: 0 2px 10px rgba(20, 30, 50, 0.06);
    }

    .mobile-menu-button {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 5px;
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        padding: 7px;
        margin-right: 10px;
        border: 1px solid #d9deea;
        border-radius: 8px;
        background: #ffffff;
        cursor: pointer;
    }

    .mobile-menu-button span {
        display: block !important;
        width: 20px;
        height: 2px;
        background: #172033;
        border-radius: 2px;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        margin-right: auto;
    }

    .mobile-brand-mark {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: #172033;
        color: #ffffff;
        font-size: 15px;
        font-weight: 800;
    }

    .mobile-brand-name {
        color: #172033;
        font-size: 13px;
        line-height: 1;
        font-weight: 800;
        letter-spacing: .4px;
    }

    .mobile-brand-product {
        margin-top: 3px;
        color: #7b8497;
        font-size: 9px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: 1.5px;
    }

    .mobile-admin-avatar {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #eef1f6;
        color: #172033;
        font-size: 13px;
        font-weight: 800;
    }

    /* Application shell */
    .app-shell {
        position: relative;
        min-height: 100vh;
        display: block;
        overflow: visible;
    }

    /* Mobile overlay */
    .mobile-overlay {
        position: fixed;
        inset: 0;
        z-index: 4000;
        display: block;
        background: rgba(10, 18, 32, .48);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, visibility .25s ease;
    }

    .mobile-overlay.mobile-overlay-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Sidebar drawer */
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        min-height: 100vh !important;
        z-index: 5000 !important;
        display: flex !important;
        transform: translate3d(-105%, 0, 0) !important;
        visibility: hidden !important;
        transition:
            transform .25s ease,
            visibility .25s ease !important;
        box-shadow: 12px 0 35px rgba(10, 20, 40, .20);
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar.mobile-sidebar-open {
        transform: translate3d(0, 0, 0) !important;
        visibility: visible !important;
    }

    .mobile-sidebar-close {
        position: absolute;
        top: 14px;
        right: 14px;
        z-index: 5100;
        width: 34px;
        height: 34px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 8px;
        background: rgba(255,255,255,.08);
        color: #ffffff;
        font-size: 25px;
        line-height: 1;
        cursor: pointer;
    }

    .mobile-sidebar-close:hover {
        background: rgba(255,255,255,.15);
    }

    /* Main content */
    .main-area {
        width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding-top: 64px;
    }

    .content {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    .topbar {
        min-height: 76px;
    }

    .system-status {
        display: none;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 600px) {

    .mobile-header {
        height: 60px;
        padding: 0 12px;
    }

    .mobile-menu-button {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        margin-right: 8px;
    }

    .mobile-brand-mark {
        width: 30px;
        height: 30px;
    }

    .mobile-brand-name {
        font-size: 12px;
    }

    .mobile-brand-product {
        font-size: 8px;
    }

    .mobile-admin-avatar {
        width: 32px;
        height: 32px;
    }

    .main-area {
        padding-top: 60px;
    }

    .topbar {
        padding: 14px 16px;
        min-height: 70px;
    }

    .topbar h1 {
        font-size: 20px;
    }

    .breadcrumb {
        font-size: 10px;
    }

    .topbar-right {
        gap: 6px;
    }

    .user-info {
        display: none;
    }

    .logout-form {
        margin-left: 0;
    }

    .logout-button {
        padding: 7px 9px;
        font-size: 11px;
    }
}

/* FINAL MOBILE OVERLAY FIX */
@media (max-width: 900px) {
    #mobileOverlay.mobile-overlay {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }

    #mobileOverlay.mobile-overlay.mobile-overlay-visible {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
}

/* ============================================================
   Organization Details
   ============================================================ */

.detail-header {
    margin-bottom: 20px;
}

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-title-row h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #172033;
}

.detail-subtitle {
    margin: 6px 0 12px;
    color: #667085;
    font-size: 14px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: #667085;
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.detail-grid .card {
    min-width: 0;
}

.detail-grid .card-header {
    margin-bottom: 0;
}

.detail-list {
    display: flex;
    flex-direction: column;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 13px 0;
    border-bottom: 1px solid #eaecf0;
}

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

.detail-row > span {
    color: #667085;
    font-size: 13px;
    flex: 0 0 42%;
}

.detail-row > strong {
    color: #172033;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

.detail-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px !important;
}

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

@media (max-width: 600px) {
    .detail-title-row h2 {
        font-size: 19px;
    }

    .detail-row {
        flex-direction: column;
        gap: 5px;
    }

    .detail-row > span {
        flex: none;
    }

    .detail-row > strong {
        text-align: left;
    }
}


/* =========================================================
   Role Permission Assignment
   ========================================================= */

.permission-group {
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: 12px;
    margin-bottom: 18px;
    overflow: hidden;
}

.permission-group:last-child {
    margin-bottom: 0;
}

.permission-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--surface-secondary, #f8fafc);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.permission-group-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.permission-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    margin: 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    transition: background-color 0.15s ease;
}

.permission-item:nth-child(odd) {
    border-right: 1px solid var(--border-color, #e5e7eb);
}

.permission-item:hover {
    background: var(--surface-secondary, #f8fafc);
}

.permission-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: var(--primary-color, #2563eb);
}

.permission-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.permission-content strong {
    font-size: 14px;
    line-height: 1.4;
}

.permission-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 12px;
}

@media (max-width: 900px) {
    .permission-list {
        grid-template-columns: 1fr;
    }

    .permission-item:nth-child(odd) {
        border-right: 0;
    }
}


/* =========================================================
   WEBITTRIO ONE — Enterprise Permission Matrix
   ========================================================= */

.permission-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.permission-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.permission-toolbar-title h2 {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
}

.permission-toolbar-title p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.permission-summary {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
    color: #64748b;
    font-size: 13px;
}

.permission-summary strong {
    color: #2563eb;
    font-size: 16px;
}

.permission-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 24px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.permission-search {
    position: relative;
    width: min(420px, 100%);
}

.permission-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.permission-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px 0 38px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #0f172a;
    font-size: 13px;
    outline: none;
    box-sizing: border-box;
}

.permission-search input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.permission-control-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.permission-text-button {
    border: 0;
    background: transparent;
    padding: 6px 2px;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.permission-text-button:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.permission-divider {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
}

.permission-content-area {
    padding: 20px 24px;
}

.permission-module {
    margin-bottom: 22px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.permission-module:last-child {
    margin-bottom: 0;
}

.permission-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 58px;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.permission-module-label {
    margin-bottom: 3px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.permission-module-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
}

.permission-select-group {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    background: #ffffff;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.permission-select-group:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.permission-table-wrapper {
    overflow-x: auto;
}

.permission-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.permission-table th {
    padding: 11px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.permission-table th:first-child {
    text-align: left;
}

.permission-name-column {
    width: 38%;
}

.permission-table td {
    border-bottom: 0;
}

.permission-name-cell {
    padding: 17px 18px;
    vertical-align: middle;
}

.permission-name-cell strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 650;
}

.permission-name-cell span {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 11px;
}

.permission-checkbox-cell {
    position: relative;
    height: 64px;
    border-left: 1px solid #f1f5f9;
    text-align: center;
    vertical-align: middle;
}

.permission-checkbox-cell:hover {
    background: #f8fafc;
}

.permission-checkbox {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.permission-checkbox input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.permission-checkmark {
    position: relative;
    display: inline-block;
    width: 19px;
    height: 19px;
    border: 1.5px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    transition: all 0.15s ease;
}

.permission-checkbox input:checked + .permission-checkmark {
    border-color: #2563eb;
    background: #2563eb;
}

.permission-checkbox input:checked + .permission-checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.permission-checkbox input:focus-visible + .permission-checkmark {
    outline: 3px solid rgba(37, 99, 235, 0.18);
    outline-offset: 2px;
}

.permission-checkbox input:disabled + .permission-checkmark {
    background: #f1f5f9;
    border-color: #cbd5e1;
    cursor: not-allowed;
}

.permission-tooltip {
    position: absolute;
    z-index: 10;
    left: 50%;
    bottom: calc(100% - 4px);
    transform: translateX(-50%);
    display: none;
    width: max-content;
    max-width: 280px;
    padding: 7px 10px;
    border-radius: 6px;
    background: #0f172a;
    color: #ffffff;
    font-size: 11px;
    line-height: 1.4;
    white-space: normal;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.18);
    pointer-events: none;
}

.permission-checkbox-cell:hover .permission-tooltip {
    display: block;
}

.permission-empty {
    padding: 60px 20px;
    text-align: center;
}

.permission-empty h3 {
    margin: 0 0 6px;
    color: #0f172a;
}

.permission-empty p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.permission-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.permission-footer-status {
    color: #64748b;
    font-size: 13px;
}

.permission-footer-status strong {
    color: #0f172a;
    font-size: 14px;
}

/* Search result highlighting */
.permission-module.permission-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 800px) {

    .permission-toolbar,
    .permission-controls,
    .permission-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .permission-controls {
        gap: 12px;
    }

    .permission-search {
        width: 100%;
    }

    .permission-control-actions {
        width: 100%;
    }

    .permission-content-area {
        padding: 14px;
    }

    .permission-module-header {
        padding: 12px 14px;
    }

    .permission-name-column {
        width: 180px;
    }

    .permission-table {
        min-width: 600px;
    }

    .permission-footer .form-actions {
        width: 100%;
    }
}


/* =========================================================
   Role Details — Permission Summary
   ========================================================= */

.role-permission-summary {
    margin-bottom: 18px;
}

.role-permission-count {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 10px 14px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
    color: #475569;
    font-size: 12px;
}

.role-permission-count strong {
    color: #2563eb;
    font-size: 20px;
}

.role-permission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.role-permission-group {
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #ffffff;
}

.role-permission-group-title {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin-bottom: 10px;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.role-permission-group-title strong {
    color: #0f172a;
    font-size: 13px;
    text-transform: none;
    letter-spacing: normal;
}

.role-permission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.role-permission-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 1px solid #dbeafe;
    border-radius: 6px;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 600;
}


/* User directory - aligned identity cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 220px;
}

.user-cell .user-avatar {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
}

.user-cell > div:last-child {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.user-cell .table-link {
    display: block;
    line-height: 1.25;
    white-space: nowrap;
}

.user-cell .mini-badge {
    display: inline-flex;
    align-items: center;
    line-height: 1;
    white-space: nowrap;
}

/* Keep user directory columns clearly separated */
.platform-users-table th,
.platform-users-table td {
    vertical-align: middle;
}


/* =========================================================
   WEBITTRIO ONE — User Details
   ========================================================= */

.user-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 26px 28px;
    margin-bottom: 24px;
    background: #ffffff;
    border: 1px solid #dfe5ef;
    border-radius: 10px;
}

.user-profile-identity {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.user-profile-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #172033;
    color: #ffffff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .04em;
}

.user-profile-main {
    min-width: 0;
}

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

.user-profile-name-row h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
    color: #111827;
}

.user-profile-email {
    margin-top: 5px;
    color: #5f6b7a;
    font-size: 14px;
}

.user-profile-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    color: #7b8797;
    font-size: 12px;
}

.user-meta-separator {
    color: #b4bdc9;
}

.user-profile-badges {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 360px;
}

.profile-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.profile-badge-owner {
    background: #eef2ff;
    color: #3949ab;
}

.profile-badge-admin {
    background: #edf7f2;
    color: #23734d;
}

.profile-badge-verified {
    background: #edf7f2;
    color: #23734d;
}

.profile-badge-warning {
    background: #fff6e6;
    color: #946200;
}

.user-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.user-detail-card,
.user-access-card,
.user-roles-card {
    overflow: hidden;
}

.user-detail-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-section-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 7px;
    background: #f0f4fa;
    color: #245edb;
    font-size: 12px;
    font-weight: 800;
}

.user-detail-card-header h2 {
    margin: 0;
}

.user-detail-card-header p {
    margin: 3px 0 0;
}

.user-info-list {
    padding: 4px 22px 12px;
}

.user-info-row {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    min-height: 58px;
    border-bottom: 1px solid #edf0f4;
}

.user-info-row:last-child {
    border-bottom: 0;
}

.user-info-label {
    color: #6d7786;
    font-size: 13px;
}

.user-info-value {
    min-width: 0;
    color: #1b2430;
    font-size: 13px;
    text-align: right;
}

.user-info-value.strong {
    font-weight: 700;
}

.user-info-secondary {
    display: block;
    margin-top: 3px;
    color: #7b8797;
    font-size: 11px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    background: #eef3ff;
    color: #3159a6;
    font-size: 12px;
    font-weight: 700;
}

.user-access-card {
    margin-bottom: 24px;
}

.access-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #edf0f4;
}

.access-summary-item {
    min-height: 92px;
    padding: 18px 20px;
    border-right: 1px solid #edf0f4;
}

.access-summary-item:last-child {
    border-right: 0;
}

.access-summary-label {
    margin-bottom: 9px;
    color: #778292;
    font-size: 12px;
    font-weight: 600;
}

.access-summary-value {
    font-size: 14px;
    font-weight: 600;
}

.access-positive {
    color: #23734d;
}

.access-neutral {
    color: #7b8797;
}

.role-count {
    color: #7b8797;
    font-size: 12px;
}

.platform-user-roles-table th,
.platform-user-roles-table td {
    vertical-align: middle;
}

.role-name-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-role-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #23734d;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 900px) {
    .user-profile-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-profile-badges {
        justify-content: flex-start;
        max-width: none;
    }

    .user-detail-grid {
        grid-template-columns: 1fr;
    }

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

    .access-summary-item:nth-child(2) {
        border-right: 0;
    }

    .access-summary-item:nth-child(-n+2) {
        border-bottom: 1px solid #edf0f4;
    }
}

@media (max-width: 600px) {
    .user-profile-identity {
        align-items: flex-start;
    }

    .user-profile-avatar {
        width: 52px;
        height: 52px;
        flex-basis: 52px;
    }

    .user-info-row {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 12px 0;
    }

    .user-info-value {
        text-align: left;
    }

    .access-summary-grid {
        grid-template-columns: 1fr;
    }

    .access-summary-item {
        border-right: 0;
        border-bottom: 1px solid #edf0f4;
    }

    .access-summary-item:last-child {
        border-bottom: 0;
    }
}


/* =========================================================
   User Role Change Panel
   ========================================================= */

.user-role-change-panel {
    margin: 0 24px 24px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f8fafc;
}

.user-role-change-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.user-role-change-header h3 {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}

.user-role-change-header p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.user-role-current {
    min-width: 180px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}

.user-role-current span {
    display: block;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.user-role-current strong {
    display: block;
    font-size: 14px;
    color: #111827;
}

.user-role-change-form {
    margin: 0;
}

.user-role-form-row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
}

.user-role-form-row .form-group {
    flex: 1;
    margin: 0;
}

.user-role-form-row label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.user-role-form-row select {
    width: 100%;
    min-height: 42px;
}

.user-role-form-action {
    flex: 0 0 auto;
}

.user-role-form-action .btn {
    min-height: 42px;
    white-space: nowrap;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6b7280;
}

.form-error {
    margin-top: 6px;
    font-size: 12px;
    color: #b91c1c;
}

@media (max-width: 768px) {

    .user-role-change-panel {
        margin: 0 16px 20px;
        padding: 16px;
    }

    .user-role-change-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .user-role-current {
        width: 100%;
    }

    .user-role-form-row {
        align-items: stretch;
        flex-direction: column;
    }

    .user-role-form-action {
        width: 100%;
    }

    .user-role-form-action .btn {
        width: 100%;
    }

}


/* =========================================================
   Edit User Page
   ========================================================= */

.edit-user-form-grid {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
}

.edit-user-form-grid > .card {
    width: 100%;
    min-width: 0;
}

.edit-user-access-card {
    grid-column: 1 / -1;
}

.edit-user-form-grid .form-section {
    width: 100%;
}

.edit-user-form-grid .form-row {
    width: 100%;
}

.edit-user-form-grid .form-group {
    min-width: 0;
}

.edit-user-form-grid .form-control {
    width: 100%;
    box-sizing: border-box;
}

.edit-user-form-grid + .form-actions {
    width: 100%;
    max-width: 1400px;
    margin: 24px auto 0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 900px) {
    .edit-user-form-grid {
        grid-template-columns: 1fr;
    }

    .edit-user-access-card {
        grid-column: auto;
    }
}


/* =========================================================
   Edit User — Final Layout Overrides
   ========================================================= */

.edit-user-form-grid {
    display: grid;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.edit-user-form-grid > .card {
    width: 100%;
    min-width: 0;
    margin: 0;
    box-sizing: border-box;
}

.edit-user-form-grid .card-header {
    padding: 22px 28px;
}

.edit-user-form-grid .form-section {
    width: 100%;
    box-sizing: border-box;
}

.edit-user-form-grid .form-row {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
}

.edit-user-form-grid .form-group {
    width: 100%;
    min-width: 0;
    margin: 0 0 18px;
}

/* Prevent global form input styling from affecting checkboxes */
.edit-user-form-grid .form-group input[type="checkbox"] {
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    height: 18px !important;
    min-height: 18px !important;
    padding: 0 !important;
    margin: 0;
    border: 1px solid #b8c1ce;
    border-radius: 4px;
    box-shadow: none;
    cursor: pointer;
    accent-color: #2563eb;
}

.edit-user-form-grid .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin-top: 6px;
}

.edit-user-form-grid .form-check label {
    display: inline-block;
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
    line-height: 1.4;
    cursor: pointer;
}

.edit-user-form-grid .form-check input[type="checkbox"] + label {
    width: auto;
}

.edit-user-access-card {
    grid-column: 1 / -1;
}

.edit-user-access-card .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.edit-user-form-grid + .form-actions {
    width: 100%;
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

@media (max-width: 900px) {

    .edit-user-form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .edit-user-access-card {
        grid-column: auto;
    }

    .edit-user-form-grid .form-row,
    .edit-user-access-card .form-row {
        grid-template-columns: 1fr;
    }

}


/* =========================================================
   User Details — Compact Header Actions
   ========================================================= */

.page-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.page-header-actions .user-status-action-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.page-header-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 0 !important;
    min-height: 36px !important;
    height: 36px;
    padding: 0 12px !important;
    margin: 0 !important;
    font-size: 12px !important;
    font-weight: 600;
    line-height: 1;
    border-radius: 7px;
    white-space: nowrap;
    box-sizing: border-box;
}

/* Back / Edit */
.page-header-actions > .btn-secondary {
    min-width: 90px;
}

/* Status actions */
.page-header-actions .user-status-action-form .btn {
    min-width: 82px;
}

/* Warning action */
.page-header-actions .user-status-action-form .btn-warning {
    background: #fff7e6;
    border: 1px solid #f2c46d;
    color: #9a6700;
}

/* Danger action */
.page-header-actions .user-status-action-form .btn-danger {
    background: #fff1f1;
    border: 1px solid #e5a3a3;
    color: #b42318;
}

/* Primary / Activate */
.page-header-actions .user-status-action-form .btn-primary {
    min-width: 82px;
}

/* Small screens */
@media (max-width: 900px) {
    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .page-header-actions .btn {
        min-height: 34px !important;
        height: 34px;
        padding: 0 10px !important;
        font-size: 11px !important;
    }
}


/* =========================================================
   User Status Change Modal
   ========================================================= */

.user-status-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.user-status-modal.is-open {
    display: flex;
}

.user-status-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.user-status-modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(16, 24, 40, 0.20);
    overflow: hidden;
}

.user-status-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid #eaecf0;
}

.user-status-modal-header h3 {
    margin: 0 0 5px;
    font-size: 18px;
    line-height: 1.4;
    font-weight: 700;
    color: #101828;
}

.user-status-modal-header p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #667085;
}

.user-status-modal-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #667085;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.user-status-modal-close:hover {
    background: #f2f4f7;
    color: #344054;
}

.user-status-modal-user {
    margin: 18px 24px 0;
    padding: 13px 15px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 8px;
}

.user-status-modal-user strong {
    display: block;
    margin-bottom: 3px;
    font-size: 13px;
    color: #344054;
}

.user-status-modal-user span {
    display: block;
    font-size: 12px;
    color: #667085;
}

.user-status-modal-body {
    padding: 20px 24px 22px;
}

.user-status-modal-body label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
}

.user-status-modal-body label span {
    color: #d92d20;
}

.user-status-modal-body textarea {
    display: block;
    width: 100%;
    min-height: 110px;
    padding: 11px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 7px;
    background: #ffffff;
    color: #101828;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.5;
    resize: vertical;
    box-sizing: border-box;
    outline: none;
}

.user-status-modal-body textarea:focus {
    border-color: #84adf5;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.10);
}

.user-status-modal-help {
    margin-top: 7px;
    font-size: 11px;
    line-height: 1.5;
    color: #667085;
}

.user-status-modal-error {
    min-height: 18px;
    margin-top: 6px;
    font-size: 12px;
    color: #d92d20;
}

.user-status-modal-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid #eaecf0;
    background: #fcfcfd;
}

.user-status-modal-actions .btn {
    min-width: 90px;
    min-height: 36px;
    height: 36px;
    padding: 0 13px;
    font-size: 12px;
    font-weight: 600;
}

.user-status-modal-actions .btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .user-status-modal {
        padding: 12px;
    }

    .user-status-modal-dialog {
        max-width: 100%;
    }

    .user-status-modal-header,
    .user-status-modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .user-status-modal-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    .user-status-modal-user {
        margin-left: 18px;
        margin-right: 18px;
    }
}


/* =========================================================
   Audit Logs
   ========================================================= */

.audit-log-filter-card,
.audit-log-card {
    margin-bottom: 24px;
}

.audit-log-filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 16px;
    padding: 24px;
    align-items: end;
}

.audit-log-filter-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #344054;
}

.audit-log-filter-field input,
.audit-log-filter-field select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    box-sizing: border-box;
}

.audit-log-filter-actions {
    display: flex;
    gap: 8px;
}

.audit-action-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
}

.audit-user-name {
    font-weight: 600;
    color: #111827;
}

.audit-user-email {
    margin-top: 2px;
    font-size: 12px;
    color: #667085;
}

.audit-log-date {
    font-weight: 600;
}

.audit-log-time {
    font-size: 12px;
    color: #667085;
}

.audit-status-change {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.audit-status-old {
    color: #b42318;
    font-weight: 600;
}

.audit-status-new {
    color: #067647;
    font-weight: 600;
}

.audit-status-arrow {
    color: #98a2b3;
}

.audit-reason {
    max-width: 320px;
    white-space: normal;
    line-height: 1.5;
}

.audit-ip {
    font-family: monospace;
    font-size: 12px;
}

.audit-muted {
    color: #98a2b3;
}

.audit-empty-state {
    padding: 40px;
    text-align: center;
}

.audit-empty-state strong {
    display: block;
    margin-bottom: 6px;
}

.audit-empty-state span {
    color: #667085;
}

.audit-log-pagination {
    padding: 18px 24px;
    border-top: 1px solid #eaecf0;
}

@media (max-width: 1200px) {

    .audit-log-filter-form {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 768px) {

    .audit-log-filter-form {
        grid-template-columns: 1fr;
    }

    .audit-log-filter-actions {
        width: 100%;
    }

    .audit-log-filter-actions .btn {
        flex: 1;
    }

}


/* =========================================================
   Audit Event Details
   ========================================================= */

.audit-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.audit-detail-card {
    min-width: 0;
    overflow: hidden;
}

.audit-detail-full {
    grid-column: 1 / -1;
}

.audit-detail-body {
    padding: 0 24px 8px;
}

.audit-detail-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
    padding: 16px 0;
    border-bottom: 1px solid #eaecf0;
}

.audit-detail-row:last-child {
    border-bottom: 0;
}

.audit-detail-label {
    font-size: 12px;
    font-weight: 600;
    color: #667085;
}

.audit-detail-value {
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #344054;
}

.audit-detail-secondary {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    color: #667085;
}

.audit-detail-mono {
    font-family: monospace;
    font-size: 12px;
    word-break: break-all;
}

.audit-detail-user-agent {
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    word-break: break-word;
}

.audit-user-detail-name {
    font-size: 16px;
    font-weight: 700;
    color: #101828;
}

.audit-user-detail-email {
    margin-top: 4px;
    font-size: 13px;
    color: #667085;
}

.audit-status-detail {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-top: 24px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #eaecf0;
    border-radius: 8px;
}

.audit-status-detail > div:not(.audit-status-detail-arrow) {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.audit-status-detail-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #667085;
}

.audit-status-detail-old,
.audit-status-detail-new {
    font-size: 13px;
    font-weight: 700;
}

.audit-status-detail-old {
    color: #b42318;
}

.audit-status-detail-new {
    color: #067647;
}

.audit-status-detail-arrow {
    color: #98a2b3;
    font-size: 18px;
}

.audit-reason-detail {
    padding: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: #344054;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {

    .audit-detail-grid {
        grid-template-columns: 1fr;
    }

    .audit-detail-full {
        grid-column: auto;
    }

}

@media (max-width: 600px) {

    .audit-detail-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .audit-status-detail {
        gap: 12px;
    }

}


/* =========================================================
   Generic Audit Change Details
   ========================================================= */

.audit-change-section {
    margin-top: 24px;
}

.audit-change-section:first-child {
    margin-top: 0;
}

.audit-change-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
}

.audit-change-title span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    font-size: 11px;
}

.audit-change-added {
    color: #15803d;
}

.audit-change-added span {
    background: #dcfce7;
    color: #166534;
}

.audit-change-removed {
    color: #b91c1c;
}

.audit-change-removed span {
    background: #fee2e2;
    color: #991b1b;
}

.audit-change-modified {
    color: #92400e;
}

.audit-change-modified span {
    background: #fef3c7;
    color: #92400e;
}

.audit-change-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-change-item {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.audit-change-item-added {
    border-left: 3px solid #22c55e;
}

.audit-change-item-removed {
    border-left: 3px solid #ef4444;
}

.audit-change-marker {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    font-weight: 700;
}

.audit-change-field {
    font-weight: 600;
    color: #111827;
}

.audit-change-old {
    margin-top: 4px;
    color: #b91c1c;
    font-size: 13px;
}

.audit-change-new {
    margin-top: 4px;
    color: #15803d;
    font-size: 13px;
}

.audit-change-values {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    margin-top: 10px;
}

.audit-change-label {
    display: block;
    margin-bottom: 4px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.audit-change-arrow {
    color: #9ca3af;
    font-size: 18px;
}

.audit-state-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.audit-state-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.audit-state-row {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.audit-state-row > div {
    margin-bottom: 5px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.audit-state-row pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: inherit;
    font-size: 13px;
    color: #111827;
}

@media (max-width: 800px) {
    .audit-change-values,
    .audit-state-grid {
        grid-template-columns: 1fr;
    }

    .audit-change-arrow {
        display: none;
    }
}

/* =========================================================
   AUDIT PERMISSION COMPARISON
   ========================================================= */

.audit-change-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.audit-change-summary-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.audit-change-summary-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 700;
}

.audit-change-summary-label {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

.audit-change-summary-description {
    margin-top: 3px;
    color: #6b7280;
    font-size: 12px;
}

.audit-change-summary-added .audit-change-summary-number {
    background: #dcfce7;
    color: #166534;
}

.audit-change-summary-removed .audit-change-summary-number {
    background: #fee2e2;
    color: #991b1b;
}

.audit-change-summary-modified .audit-change-summary-number {
    background: #fef3c7;
    color: #92400e;
}

.audit-permission-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.audit-permission-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}

.audit-permission-added {
    border-left: 3px solid #22c55e;
}

.audit-permission-removed {
    border-left: 3px solid #ef4444;
}

.audit-permission-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    border-radius: 50%;
    background: #f3f4f6;
    font-weight: 700;
}

.audit-permission-name {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}

.audit-permission-slug {
    margin-top: 2px;
    color: #6b7280;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.audit-permission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    color: #6b7280;
    font-size: 11px;
}

.audit-permission-comparison {
    overflow-x: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.audit-permission-comparison-header,
.audit-permission-comparison-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.8fr) minmax(120px, .8fr) minmax(120px, .8fr) minmax(110px, .7fr);
    gap: 16px;
    align-items: center;
    min-width: 760px;
}

.audit-permission-comparison-header {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.audit-permission-comparison-row {
    padding: 13px 14px;
    border-bottom: 1px solid #f1f5f9;
}

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

.audit-presence-badge,
.audit-permission-change-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.audit-presence-yes {
    background: #dcfce7;
    color: #166534;
}

.audit-presence-no {
    background: #f3f4f6;
    color: #6b7280;
}

.audit-permission-change-added {
    background: #dcfce7;
    color: #166534;
}

.audit-permission-change-removed {
    background: #fee2e2;
    color: #991b1b;
}

.audit-permission-change-unchanged {
    background: #f3f4f6;
    color: #6b7280;
}

@media (max-width: 800px) {
    .audit-change-summary-grid {
        grid-template-columns: 1fr;
    }
}
