:root {
    --primary: #2874f0;
    --primary-dark: #125cdb;
    --accent: #ffd814;
    --bg-light: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body.enterprise-root-portal {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

/* Accessibility Top Bar */
.ent-a11y-bar {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 6px 24px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ent-a11y-bar-controls button {
    background: transparent;
    border: 1px solid #334155;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 6px;
    font-weight: 700;
    cursor: pointer;
}
.ent-a11y-bar-controls button:hover {
    background: #334155;
}

/* High Contrast Mode */
body.a11y-high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}
body.a11y-high-contrast .ent-header,
body.a11y-high-contrast .ent-form-card,
body.a11y-high-contrast .ent-table-card,
body.a11y-high-contrast .ent-sidebar {
    background: #111 !important;
    color: #fff !important;
    border-color: #444 !important;
}
body.a11y-high-contrast a {
    color: #ffd814 !important;
}

/* Sticky Header */
.ent-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.ent-search-box {
    position: relative;
    width: 320px;
}
.ent-search-box input {
    width: 100%;
    padding: 9px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    outline: none;
    box-sizing: border-box;
}
.ent-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 0 0 6px 6px;
    list-style: none;
    padding: 0;
    margin: 4px 0 0;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    display: none;
    z-index: 1001;
}
.ent-search-dropdown li a {
    display: block;
    padding: 10px 14px;
    color: #1e293b;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
}
.ent-search-dropdown li a:hover {
    background: #f8fafc;
}

.ent-nav-menu {
    display: flex;
    align-items: center;
    gap: 16px;
}
.ent-nav-menu a {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.ent-nav-menu a:hover {
    color: var(--primary);
}

.ent-btn-auth {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700 !important;
}
.ent-btn-signin {
    background: #f1f5f9;
    color: #0f172a !important;
}
.ent-btn-signup {
    background: var(--accent);
    color: #000 !important;
}

/* Hero Carousel */
.ent-slider-container {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
}
.ent-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}
.ent-slide.active {
    opacity: 1;
    z-index: 10;
}
.ent-slide h2 {
    font-size: 38px;
    font-weight: 800;
    margin: 0 0 12px;
}
.ent-slide p {
    font-size: 18px;
    max-width: 750px;
    margin: 0;
    line-height: 1.5;
}

.ent-slider-ctrl {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 28px;
    padding: 10px 18px;
    cursor: pointer;
    border-radius: 4px;
    z-index: 20;
}
.ent-slider-prev { left: 20px; }
.ent-slider-next { right: 20px; }

/* Dashboard Layout */
.ent-app-layout {
    display: flex;
    min-height: calc(100vh - 120px);
}
.ent-sidebar {
    width: 260px;
    background: #1e293b;
    color: #fff;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
}
.ent-sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #334155;
}
.ent-avatar-circle {
    width: 38px;
    height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
}
.ent-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}
.ent-sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.ent-sidebar-menu li a:hover,
.ent-sidebar-menu li a.active {
    background: #0f172a;
    color: #fff;
    border-left: 4px solid var(--primary);
}

.ent-app-main {
    flex: 1;
    padding: 30px;
    background: #f8fafc;
}
.ent-tab-pane {
    display: none;
}
.ent-tab-pane.active {
    display: block;
}

/* Metric Cards */
.ent-dash-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}
.ent-metric-card {
    background: #ffffff;
    padding: 22px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary);
}
.ent-metric-val {
    font-size: 28px;
    font-weight: 800;
    margin-top: 6px;
    color: #0f172a;
}

/* Tables & Forms */
.ent-table-card, .ent-form-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.ent-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.ent-table th, .ent-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}
.ent-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
}

.status-pill {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.status-publish { background: #dcfce7; color: #15803d; }
.status-draft { background: #fef3c7; color: #b45309; }
.status-in_compliance_review { background: #e0e7ff; color: #4338ca; }

.ent-form-group {
    margin-bottom: 16px;
}
.ent-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #334155;
}
.ent-form-group input,
.ent-form-group textarea,
.ent-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.ent-submit-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 22px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.ent-submit-btn:hover {
    background: var(--primary-dark);
}

.btn-action-edit, .btn-action-del {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}
.btn-action-edit { background: #e0f2fe; color: #0369a1; }
.btn-action-del { background: #fee2e2; color: #b91c1c; }

/* Modals */
.ent-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
.ent-modal-box {
    background: #fff;
    padding: 28px;
    border-radius: 10px;
    width: 100%;
    max-width: 550px;
}

/* Standalone Auth Container */
.ent-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 120px);
    background: #f1f5f9;
    padding: 20px;
}


.ent-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}