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

:root {
    --page-bg: #eef3f8;
    --shell-bg: #ffffff;
    --app-bg: #f6f8fc;
    --text: #172033;
    --muted: #707887;
    --navy: #19213a;
    --indigo: #5b5eea;
    --purple: #8b5cf6;
    --cyan: #26c6da;
    --mint: #9debdc;
    --rose: #f7b7c8;
    --peach: #ffd2b7;
    --yellow: #f7dc8f;
    --border: #e8edf5;
    --shadow: 0 30px 90px rgba(42, 55, 84, 0.14);
    --shadow-soft: 0 14px 34px rgba(42, 55, 84, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Assistant, Arial, sans-serif;
    background:
        radial-gradient(circle at 12% 10%, rgba(139, 92, 246, 0.13), transparent 28%),
        radial-gradient(circle at 88% 16%, rgba(38, 198, 218, 0.12), transparent 30%),
        var(--page-bg);
    color: var(--text);
    min-height: 100vh;
}

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

.topbar {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 48px;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(232, 237, 245, 0.9);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--indigo), var(--cyan));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.brand-title {
    font-size: 23px;
    font-weight: 800;
    color: var(--navy);
}

.brand-subtitle {
    font-size: 14px;
    color: var(--muted);
}

.nav {
    display: flex;
    gap: 8px;
}

.nav a {
    padding: 10px 17px;
    border-radius: 999px;
    color: var(--navy);
    font-weight: 700;
    transition: 0.18s ease;
}

.nav a:hover {
    background: #eef0ff;
    color: var(--indigo);
}

.app-page {
    width: 100%;
    min-height: calc(100vh - 82px);
    padding: 0;
}

.login-page {
    min-height: 100vh;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-card {
    width: 100%;
    max-width: 510px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(232, 237, 245, 0.95);
    box-shadow: var(--shadow);
    border-radius: 34px;
    padding: 48px;
    backdrop-filter: blur(20px);
}

.login-kicker,
.eyebrow {
    color: var(--indigo);
    font-weight: 800;
    letter-spacing: 0.04em;
    font-size: 15px;
}

.login-card h1,
.page-header h1,
.item-card h1 {
    margin: 8px 0 12px;
    font-size: 46px;
    line-height: 1.05;
    color: var(--navy);
}

.login-card p,
.content-card p,
.item-summary {
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

.login-form {
    display: grid;
    gap: 13px;
    margin-top: 30px;
}

label {
    font-weight: 800;
    color: var(--navy);
}

input,
select {
    width: 100%;
    border: 1px solid var(--border);
    background: white;
    border-radius: 16px;
    padding: 15px 17px;
    font: inherit;
    font-size: 17px;
    outline: none;
    transition: 0.18s ease;
}

input:focus,
select:focus {
    border-color: rgba(91, 94, 234, 0.55);
    box-shadow: 0 0 0 4px rgba(91, 94, 234, 0.10);
}

button,
.button {
    border: 0;
    border-radius: 999px;
    padding: 15px 26px;
    background: linear-gradient(135deg, var(--navy), var(--indigo));
    color: white;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px rgba(91, 94, 234, 0.22);
    transition: 0.2s ease;
}

button:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(91, 94, 234, 0.28);
}

.button.secondary {
    background: #eef0ff;
    color: var(--indigo);
    box-shadow: none;
}

/* New dashboard shell */

.knowledge-shell {
    display: grid;
    grid-template-columns: 86px 1fr;
    min-height: calc(100vh - 82px);
    width: 100%;
    background: var(--app-bg);
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.side-rail {
    background: #ffffff;
    border-left: 1px solid var(--border);
    padding: 26px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    min-height: calc(100vh - 82px);
}

.rail-logo-dot {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--indigo), var(--cyan));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.rail-nav {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.rail-nav a,
.rail-logout {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7b8495;
    font-size: 18px;
    font-weight: 800;
    transition: 0.18s ease;
}

.rail-nav a:hover,
.rail-nav a.active {
    background: #eef0ff;
    color: var(--indigo);
}

.rail-logout {
    margin-top: auto;
}

.knowledge-main {
    background:
        radial-gradient(circle at 8% 4%, rgba(139, 92, 246, 0.10), transparent 28%),
        radial-gradient(circle at 88% 8%, rgba(38, 198, 218, 0.10), transparent 30%),
        var(--app-bg);
    padding: 42px 56px 70px;
    position: relative;
    min-height: calc(100vh - 82px);
}

.knowledge-header {
    max-width: 1180px;
    margin: 0 auto 24px;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.knowledge-header h1 {
    margin: 6px 0 8px;
    font-size: 34px;
    line-height: 1.1;
    color: var(--navy);
}

.knowledge-header p {
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.knowledge-count {
    min-width: 110px;
    height: 86px;
    border-radius: 24px;
    background: white;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
}

.knowledge-count span {
    color: var(--navy);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.knowledge-search {
    max-width: 1180px;
    margin: 0 auto 18px;
}

.knowledge-search form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
}

.pill-tabs {
    max-width: 1180px;
    margin: 18px auto 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-tabs a {
    padding: 9px 16px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 700;
    font-size: 15px;
    transition: 0.18s ease;
}

.pill-tabs a:hover {
    color: var(--indigo);
    border-color: rgba(91, 94, 234, 0.28);
    background: #f4f5ff;
}

.featured-grid {
    max-width: 1180px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.kb-card {
    min-height: 238px;
    border-radius: 26px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: 0.22s ease;
}

.kb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 52px rgba(42, 55, 84, 0.14);
}

.kb-card::before {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
    top: -52px;
    left: -42px;
}

.kb-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    position: relative;
    z-index: 1;
}

.kb-card-top span {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.76);
    color: rgba(25, 33, 58, 0.72);
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 800;
    font-size: 13px;
}

.kb-card h3 {
    font-size: 22px;
    line-height: 1.15;
    margin: 28px 0 10px;
    color: var(--navy);
    position: relative;
    z-index: 1;
}

.kb-card p {
    margin: 0;
    color: rgba(25, 33, 58, 0.70);
    line-height: 1.45;
    font-size: 16px;
    position: relative;
    z-index: 1;
}

.kb-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    color: rgba(25, 33, 58, 0.72);
    font-size: 14px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.kb-card-footer strong {
    color: var(--navy);
}

.card-tone-1 {
    background: linear-gradient(135deg, #d8d4ff, #f0e9ff);
}

.card-tone-2 {
    background: linear-gradient(135deg, #ffd8e2, #fff0d8);
}

.card-tone-3 {
    background: linear-gradient(135deg, #c9f4e8, #d8f7ff);
}

.card-tone-4 {
    background: linear-gradient(135deg, #ffe0cf, #fff2d0);
}

.card-tone-5 {
    background: linear-gradient(135deg, #d4f8ff, #e4ecff);
}

.card-tone-6 {
    background: linear-gradient(135deg, #e3dcff, #f6e9ff);
}

/* Existing pages */

.hero {
    display: grid;
    grid-template-columns: 1fr 235px;
    gap: 30px;
    align-items: stretch;
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 42px;
    box-shadow: var(--shadow-soft);
}

.hero h1 {
    color: var(--navy);
    font-size: 42px;
    margin: 8px 0 12px;
}

.hero p {
    color: var(--muted);
    font-size: 19px;
    line-height: 1.6;
}

.hero-stat {
    border-radius: 26px;
    background: linear-gradient(135deg, var(--navy), var(--indigo));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
}

.hero-stat span {
    font-size: 64px;
    font-weight: 800;
}

.search-panel {
    margin: 30px 0;
}

.search-panel form,
.filters form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

.filters form {
    grid-template-columns: 1.4fr 1fr 1fr auto;
}

.gate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    margin: 28px 0 48px;
}

.gate-card,
.content-card,
.item-card,
.admin-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 28px;
    box-shadow: var(--shadow-soft);
    transition: 0.22s ease;
}

.gate-card:hover,
.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.gate-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #eef0ff;
    color: var(--indigo);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 17px;
}

.gate-card h2,
.section h2,
.admin-section h2 {
    margin: 0 0 10px;
    font-size: 28px;
    color: var(--navy);
}

.gate-card p {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.55;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.content-card {
    min-height: 224px;
}

.content-card h3 {
    font-size: 24px;
    margin: 12px 0 8px;
    color: var(--navy);
}

.card-type,
.card-meta span {
    display: inline-flex;
    background: #eef0ff;
    color: var(--indigo);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 14px;
    font-weight: 800;
    margin-left: 6px;
    margin-bottom: 6px;
}

.tags {
    margin-top: 14px;
    color: var(--navy);
    font-weight: 800;
    font-size: 15px;
}

.tags.big {
    font-size: 17px;
    background: #f6f8fc;
    padding: 15px 18px;
    border-radius: 18px;
    color: var(--navy);
    border: 1px solid var(--border);
}

.page-header {
    margin-bottom: 22px;
}

.filters {
    margin-bottom: 26px;
}

.empty-state {
    grid-column: 1 / -1;
    background: white;
    border-radius: 24px;
    padding: 38px;
    color: var(--muted);
    text-align: center;
    font-size: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
}

.item-view {
    max-width: 880px;
    margin: 0 auto;
}

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--indigo);
    font-weight: 800;
}

.info-row {
    margin-top: 24px;
    font-size: 19px;
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.messages {
    margin-bottom: 18px;
}

.message {
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff1f2;
    color: #9f1239;
    font-weight: 800;
    border: 1px solid rgba(244, 63, 94, 0.18);
}

.message.success {
    background: #ecfdf5;
    color: #047857;
    border-color: rgba(16, 185, 129, 0.18);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
}

th,
td {
    text-align: right;
    padding: 15px 16px;
    border-bottom: 1px solid var(--border);
}

th {
    background: #f6f8fc;
    color: var(--navy);
    font-weight: 800;
}

.admin-section {
    margin-bottom: 28px;
}

@media (max-width: 960px) {
    .topbar {
        padding: 0 18px;
    }

    .brand-logo {
        height: 42px;
    }

    .brand-subtitle {
        display: none;
    }

    .knowledge-shell {
        grid-template-columns: 1fr;
    }

    .side-rail {
        display: none;
    }

    .knowledge-main {
        padding: 24px;
    }

    .knowledge-header {
        flex-direction: column;
    }

    .featured-grid,
    .hero,
    .gate-grid,
    .cards-grid,
    .search-panel form,
    .filters form,
    .knowledge-search form {
        grid-template-columns: 1fr;
    }

    .login-card h1,
    .page-header h1,
    .item-card h1 {
        font-size: 38px;
    }


.library-filters {
    max-width: 1180px;
    margin: 0 auto 26px;
}

.library-filters form {
    display: grid;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
}

.library-grid {
    align-items: stretch;
}

.item-workspace {
    max-width: 980px;
    margin: 0 auto;
}

.item-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 42px;
    box-shadow: var(--shadow-soft);
}

.item-panel h1 {
    margin: 22px 0 14px;
    font-size: 42px;
    line-height: 1.1;
    color: var(--navy);
}



@media (max-width: 960px) {
    .library-filters form {
        grid-template-columns: 1fr;
    }

    .item-panel {
        padding: 28px;
    }

    .item-panel h1 {
        font-size: 34px;
    }
}


.app-content-wrap {
    width: min(1180px, calc(100vw - 160px));
    margin: 0 auto;
}

.app-content-wrap .knowledge-header,
.app-content-wrap .knowledge-search,
.app-content-wrap .pill-tabs,
.app-content-wrap .featured-grid,
.app-content-wrap .library-filters,
.app-content-wrap .admin-section {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.library-filters {
    margin-bottom: 28px;
}

.library-filters form {
    display: grid;
    grid-template-columns: 1fr 240px 240px 120px;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 12px;
    box-shadow: var(--shadow-soft);
}

.library-filters input,
.library-filters select {
    height: 56px;
}

.library-filters button {
    height: 56px;
    padding: 0 24px;
}

.library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: var(--shadow-soft);
}

.admin-section + .admin-section {
    margin-top: 28px;
}

.admin-section .table-wrap {
    border-radius: 20px;
    overflow: hidden;
}

.admin-section table {
    margin-top: 0;
    box-shadow: none;
}

@media (max-width: 1200px) {
    .app-content-wrap {
        width: calc(100vw - 130px);
    }

    .library-filters form {
        grid-template-columns: 1fr 200px 200px 110px;
    }
}

@media (max-width: 960px) {
    .app-content-wrap {
        width: 100%;
    }

    .library-filters form {
        grid-template-columns: 1fr;
    }

    .library-grid {
        grid-template-columns: 1fr;
    }
}


/* FINAL LAYOUT OVERRIDE */

.knowledge-main {
    padding: 42px 56px 70px !important;
}

.app-content-wrap {
    width: min(1180px, calc(100vw - 170px)) !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
}

.app-content-wrap .knowledge-header,
.app-content-wrap .knowledge-search,
.app-content-wrap .pill-tabs,
.app-content-wrap .featured-grid,
.app-content-wrap .library-filters,
.app-content-wrap .admin-section {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Library filters fixed */

.library-filters {
    width: 100% !important;
    margin: 0 0 28px 0 !important;
}

.library-filters form {
    display: grid !important;
    grid-template-columns: minmax(360px, 1fr) 230px 230px 112px !important;
    gap: 12px !important;
    align-items: center !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    padding: 12px !important;
    box-shadow: var(--shadow-soft) !important;
}

.library-filters input,
.library-filters select,
.library-filters button {
    height: 54px !important;
    min-height: 54px !important;
}

.library-filters button {
    padding: 0 22px !important;
}

/* Cards grid fixed */

.featured-grid,
.library-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 22px !important;
}

/* Admin fixed */

.admin-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 28px 0 !important;
    background: #ffffff !important;
    border: 1px solid var(--border) !important;
    border-radius: 28px !important;
    padding: 30px !important;
    box-shadow: var(--shadow-soft) !important;
}

.admin-section h2 {
    margin: 0 0 20px 0 !important;
    color: var(--navy) !important;
    font-size: 28px !important;
}

.admin-section table {
    margin: 0 !important;
    box-shadow: none !important;
}

.admin-section .table-wrap {
    border-radius: 20px !important;
    overflow: hidden !important;
}

/* Mobile */

@media (max-width: 1200px) {
    .app-content-wrap {
        width: calc(100vw - 140px) !important;
    }

    .library-filters form {
        grid-template-columns: 1fr 200px 200px 110px !important;
    }
}

@media (max-width: 960px) {
    .knowledge-main {
        padding: 24px !important;
    }

    .app-content-wrap {
        width: 100% !important;
    }

    .library-filters form {
        grid-template-columns: 1fr !important;
    }

    .featured-grid,
    .library-grid {
        grid-template-columns: 1fr !important;
    }
}


/* HARD FIX - unified inner layout */

.kb-inner {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
}

.kb-inner .knowledge-header {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 24px 0 !important;
}

.kb-inner .library-filters {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 28px 0 !important;
}

.kb-inner .library-filters form {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(360px, 1fr) 220px 220px 115px !important;
    gap: 12px !important;
    align-items: center !important;
}

.kb-inner .library-filters input,
.kb-inner .library-filters select,
.kb-inner .library-filters button {
    height: 54px !important;
}

.kb-inner .featured-grid,
.kb-inner .library-grid {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.kb-inner .admin-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 28px 0 !important;
}

@media (max-width: 960px) {
    .kb-inner {
        max-width: 100% !important;
    }

    .kb-inner .library-filters form {
        grid-template-columns: 1fr !important;
    }

    .kb-inner .featured-grid,
    .kb-inner .library-grid {
        grid-template-columns: 1fr !important;
    }
}


.kb-card-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 8px 0 12px;
    position: relative;
    z-index: 1;
    color: rgba(25, 33, 58, 0.70);
    font-size: 14px;
    font-weight: 800;
}

.source-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.78);
    border-radius: 999px;
    padding: 5px 10px;
    color: rgba(25, 33, 58, 0.78);
}

.source-chip img {
    height: 18px;
    width: auto;
    max-width: 58px;
    object-fit: contain;
    display: block;
}

}

.source-logo-floating {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 62px;
    height: 36px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(31, 42, 68, 0.08);
    box-shadow: 0 8px 20px rgba(31, 42, 68, 0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    z-index: 3;
}

.source-logo-floating img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}



.add-user-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}



.add-user-form label {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 800;
    color: #24304f;
}

.add-user-form input,
.add-user-form select {
    height: 46px;
    border-radius: 14px;
    border: 1px solid #dfe5f1;
    padding: 0 14px;
    font-size: 15px;
    background: #ffffff;
}



.primary-admin-btn:hover {
    transform: translateY(-1px);
}

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


.admin-users-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 8px 0 22px;
}

.soft-add-user-btn {
    border: 1px solid rgba(95, 109, 246, 0.18);
    background: rgba(255, 255, 255, 0.78);
    color: #4f5bd5;
    border-radius: 999px;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(31, 42, 68, 0.06);
    transition: all 0.18s ease;
}

.soft-add-user-btn:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(95, 109, 246, 0.13);
}

.add-user-panel {
    margin: 0 0 26px;
    padding: 24px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.96)),
        radial-gradient(circle at top left, rgba(123, 97, 255, 0.10), transparent 38%);
    border: 1px solid rgba(223, 229, 241, 0.9);
    box-shadow: 0 18px 46px rgba(31, 42, 68, 0.08);
}

.add-user-panel-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.add-user-panel-header h2 {
    margin: 0 0 7px;
    font-size: 22px;
    color: #1f2a44;
    font-weight: 950;
}

.add-user-panel-header p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

.close-panel-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(223, 229, 241, 0.95);
    background: #ffffff;
    color: #7b8499;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(31, 42, 68, 0.06);
}

.close-panel-btn:hover {
    background: #f6f8fc;
    color: #1f2a44;
}

.add-user-form {
    margin: 0;
}

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

.add-user-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-user-grid label span {
    color: #24304f;
    font-size: 13px;
    font-weight: 900;
}

.add-user-grid input,
.add-user-grid select {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    border: 1px solid #dfe5f1;
    background: rgba(255, 255, 255, 0.95);
    padding: 0 15px;
    font-size: 15px;
    color: #1f2a44;
    outline: none;
    box-sizing: border-box;
}

.add-user-grid input:focus,
.add-user-grid select:focus {
    border-color: rgba(95, 109, 246, 0.55);
    box-shadow: 0 0 0 4px rgba(95, 109, 246, 0.10);
}

.add-user-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.save-user-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #5f6df6, #7b61ff);
    color: #ffffff;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(95, 109, 246, 0.22);
}

.save-user-btn:hover {
    transform: translateY(-1px);
}

.cancel-user-btn {
    border: 1px solid #dfe5f1;
    border-radius: 999px;
    padding: 12px 20px;
    background: #ffffff;
    color: #65708a;
    font-weight: 900;
    cursor: pointer;
}

.cancel-user-btn:hover {
    background: #f6f8fc;
}

@media (max-width: 780px) {
    .add-user-grid {
        grid-template-columns: 1fr;
    }

    .add-user-panel {
        padding: 20px;
        border-radius: 22px;
    }

    .add-user-panel-header {
        align-items: flex-start;
    }
}

.flash-wrap {
    margin: 16px 0;
}

.flash-message {
    border-radius: 16px;
    padding: 13px 16px;
    font-weight: 800;
    margin-bottom: 10px;
}

.flash-success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.inline-delete-form {
    margin: 0;
}

.delete-user-btn {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: #b91c1c;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.18s ease;
}

.delete-user-btn:hover {
    background: #fee2e2;
    transform: translateY(-1px);
}

.muted-action {
    color: #a0a7b8;
    font-weight: 800;
}

.brand-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-link .brand-logo {
    display: block;
}

.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field input {
    width: 100%;
    padding-left: 48px !important;
}

.toggle-password {
    position: absolute;
    left: 10px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: #f4f6fb;
    cursor: pointer;
    font-size: 15px;
}

.toggle-password:hover {
    background: #e9edf7;
}

.password-input-wrap {
    position: relative;
    width: 100%;
}

.password-input-wrap input {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    border: 1px solid #dfe5f1;
    background: #ffffff;
    padding: 0 16px 0 78px !important;
    font-size: 15px;
    color: #1f2a44;
    box-sizing: border-box;
}

.password-eye-btn {
    position: absolute !important;
    left: 8px;
    top: 50%;
    transform: translateY(-50%) !important;

    height: 34px;
    min-width: 58px;
    border: 0;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f5bd5;
    font-size: 13px;
    font-weight: 900;
    cursor: pointer;
    z-index: 10;

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.password-eye-btn:hover {
    background: #e0e7ff;
    transform: translateY(-50%) !important;
}

.password-hint {
    margin: 7px 0 16px;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
}


/* Embedded video/article iframe inside content page */
.content-video-embed {
    margin: 28px 0;
    width: 100%;
}

.content-video-embed iframe {
    width: 100%;
    min-height: 420px;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 18px;
    display: block;
    background: #000;
}

@media (max-width: 768px) {
    .content-video-embed iframe {
        min-height: 240px;
        border-radius: 14px;
    }
}


   /* להוסיף בסוף ה-style הקיים */

    .admin-main-toolbar {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: flex-start;
        margin: 0 0 22px;
        flex-wrap: wrap;
    }

    .soft-admin-btn,
    .soft-add-user-btn {
        border: 0;
        border-radius: 999px;
        padding: 12px 20px;
        background: #eef8f6;
        color: var(--navy);
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
        box-shadow: 0 8px 20px rgba(27, 73, 69, 0.08);
        transition: 0.2s ease;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .soft-admin-btn:hover,
    .soft-add-user-btn:hover {
        transform: translateY(-1px);
        background: #dff1ee;
    }

    .content-title-cell {
        min-width: 260px;
    }

    .content-title-main {
        font-weight: 700;
        color: var(--navy);
        margin-bottom: 4px;
    }

    .content-title-sub {
        font-size: 13px;
        color: #78817f;
        line-height: 1.4;
    }

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

    .edit-content-btn {
        border: 0;
        border-radius: 999px;
        padding: 8px 14px;
        background: #f0f4ff;
        color: #34416f;
        font-weight: 700;
        text-decoration: none;
        cursor: pointer;
        font-size: 14px;
    }

    .delete-content-btn {
        border: 0;
        border-radius: 999px;
        padding: 8px 14px;
        background: #fff0f0;
        color: #9b2c2c;
        font-weight: 700;
        cursor: pointer;
        font-size: 14px;
    }

    .featured-badge {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        padding: 5px 10px;
        background: #fff7df;
        color: #7a5a00;
        font-size: 13px;
        font-weight: 700;
    }

    .quiet-badge {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        padding: 5px 10px;
        background: #f3f5f4;
        color: #69716f;
        font-size: 13px;
        font-weight: 700;
    }
