:root {
    --ent-bg0: #f4f8fc;
    --ent-bg1: #eef4fa;
    --ent-glass: rgba(255, 255, 255, 0.9);
    --ent-line: rgba(15, 23, 42, 0.12);
    --ent-text: #111827;
    --ent-sub: #4b5563;
    --ent-accent: #0ea5e9;
    --ent-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.ent-shell {
    min-height: 100vh;
    background: linear-gradient(180deg, var(--ent-bg0), var(--ent-bg1));
    padding-top: 58px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ent-bg {
    position: absolute;
    inset: 58px 0 0;
    background:
        radial-gradient(circle at 12% 12%, rgba(14, 165, 233, 0.10), transparent 36%),
        radial-gradient(circle at 85% 18%, rgba(16, 185, 129, 0.08), transparent 38%),
        radial-gradient(circle at 50% 82%, rgba(59, 130, 246, 0.06), transparent 46%);
    pointer-events: none;
    z-index: 0;
}

.glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(248, 251, 255, 0.92));
    border: 1px solid var(--ent-line);
    backdrop-filter: blur(12px) saturate(135%);
    box-shadow: var(--ent-shadow);
    color: var(--ent-text);
}

.ent-topbar {
    position: relative;
    margin: 12px;
    border-radius: 16px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    z-index: 2;
    flex: 0 0 auto;
}

.ent-title h1 {
    margin: 6px 0 4px;
    font-size: clamp(18px, 2vw, 26px);
}

.ent-title p {
    margin: 0;
    color: var(--ent-sub);
    font-size: 12px;
}

.ent-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(42, 212, 255, 0.24);
    background: rgba(42, 212, 255, 0.08);
    color: #0c4a6e;
    padding: 4px 10px;
    font-size: 12px;
}

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

.ent-btn {
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: rgba(255, 255, 255, 0.95);
    color: var(--ent-text);
    cursor: pointer;
    font-size: 13px;
}

.ent-btn:hover {
    border-color: rgba(14, 165, 233, 0.4);
    background: #f8fbff;
}

.ent-btn-primary {
    border-color: rgba(14, 165, 233, 0.45);
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.92));
}

.ent-btn-lite {
    height: 28px;
    font-size: 12px;
    padding: 0 10px;
}

.ent-grid {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 320px;
    gap: 12px;
    padding: 0 12px 16px;
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
}

.ent-col {
    border-radius: 16px;
    padding: 10px;
    max-height: none;
    height: auto;
    min-height: 0;
    overflow: auto;
}

.ent-block {
    border-radius: 14px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: rgba(255, 255, 255, 0.9);
    padding: 10px;
    margin-bottom: 10px;
}

.ent-block:last-child {
    margin-bottom: 0;
}

.ent-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ent-block-head h2 {
    margin: 0;
    font-size: 14px;
}

.ent-mini {
    font-size: 12px;
    color: var(--ent-sub);
}

.ent-search input {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(162, 221, 238, 0.14);
    background: #ffffff;
    color: var(--ent-text);
    padding: 8px 10px;
    font-size: 12px;
    outline: none;
}

.ent-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0 6px;
}

.ent-pill {
    border-radius: 999px;
    border: 1px solid rgba(162, 221, 238, 0.18);
    background: #ffffff;
    color: var(--ent-sub);
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.ent-pill.active {
    border-color: rgba(14, 165, 233, 0.45);
    color: #0f172a;
    background: rgba(186, 230, 253, 0.65);
}

.ent-company-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

h1, h2, h3, h4, h5, h6{
    color: #111827;
}

.ent-company-item {
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: #ffffff;
    padding: 8px 10px;
    cursor: pointer;
}

.ent-company-item.active {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.14);
}

.ent-company-name {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.ent-company-meta {
    margin-top: 4px;
    font-size: 12px;
    color: var(--ent-sub);
}

.ent-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.ent-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #0f172a;
}

.ent-empty {
    text-align: center;
    color: var(--ent-sub);
    padding: 40px 10px;
}

.ent-detail-card {
    border-radius: 16px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: rgba(255, 255, 255, 0.9);
    padding: 12px;
    margin-bottom: 10px;
}

.ent-detail-hero {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
}

.ent-logo {
    width: 100%;
    height: 110px;
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.18);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ent-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ent-hero-meta h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.ent-hero-meta p {
    margin: 0;
    color: var(--ent-sub);
    font-size: 12px;
    line-height: 1.5;
}

.ent-section {
    margin-top: 10px;
}

.ent-section h4 {
    margin: 0 0 6px;
    font-size: 13px;
}

.ent-section p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: var(--ent-sub);
}

.ent-entry-item,
.ent-eq-item {
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: #ffffff;
    padding: 8px 10px;
    margin-bottom: 8px;
}

.ent-entry-item:last-child,
.ent-eq-item:last-child {
    margin-bottom: 0;
}

.ent-entry-item h5,
.ent-eq-item h5 {
    margin: 0 0 4px;
    font-size: 12px;
}

.ent-entry-item p,
.ent-eq-item p {
    margin: 0;
    font-size: 12px;
    color: var(--ent-sub);
    line-height: 1.5;
}

.ent-item-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ent-modal {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 30000;
}

.ent-modal.open {
    display: block;
}

.ent-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(4px);
}

.ent-modal-dialog {
    position: absolute;
    inset: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.ent-card {
    width: min(900px, 100%);
    max-height: calc(100vh - 80px);
    overflow: auto;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid rgba(15, 23, 42, 0.14);
    padding: 12px;
}

.ent-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ent-form {
    display: grid;
    gap: 8px;
}

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

.ent-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ent-form label span {
    font-size: 12px;
    color: var(--ent-sub);
}

.ent-form input,
.ent-form textarea,
.ent-form select {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(162, 221, 238, 0.14);
    background: #ffffff;
    color: var(--ent-text);
    padding: 8px 10px;
    font-size: 12px;
    outline: none;
}

.ent-form input::placeholder,
.ent-form textarea::placeholder {
    color: #6b7280;
}

.ent-form select option {
    background: #ffffff;
    color: #111827;
}

.ent-ansost-search input::placeholder {
    color: #6b7280;
}

.ent-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ent-form-msg {
    font-size: 12px;
    color: var(--ent-sub);
}

.ent-col-2 {
    grid-column: span 2;
}

.ent-ansost-result,
.ent-ai-result {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(162, 221, 238, 0.14);
    padding: 10px;
    color: #1f2937;
    font-size: 12px;
    max-height: 280px;
    overflow: auto;
}

.ent-ansost-search {
    display: grid;
    grid-template-columns: 1.2fr 0.6fr 0.4fr auto;
    gap: 10px;
    align-items: end;
}

.ent-ansost-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
}

.ent-ansost-list,
.ent-ansost-detail {
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.14);
    background: #ffffff;
    padding: 10px;
    min-height: 220px;
    max-height: 360px;
    overflow: auto;
    font-size: 12px;
    color: #111827;
}

.ent-ansost-item {
    border-radius: 10px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: #ffffff;
    padding: 8px 10px;
    margin-bottom: 8px;
    cursor: pointer;
}

.ent-ansost-item.active {
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.16);
}

.ent-ansost-item h5 {
    margin: 0 0 4px;
    font-size: 12px;
    color: #111827;
}

.ent-ansost-item p {
    margin: 0;
    color: #4b5563;
    line-height: 1.4;
}

.ent-ansost-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ent-ansost-item-actions {
    margin-top: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.ent-ansost-item .ent-btn {
    height: 26px;
    padding: 0 8px;
    font-size: 11px;
}

.ent-modal {
    pointer-events: none;
}

.ent-modal.open {
    pointer-events: auto;
}

.ent-modal-backdrop {
    z-index: 30000;
    pointer-events: auto;
}

.ent-modal-dialog {
    z-index: 30001;
    pointer-events: auto;
}

.ent-card {
    position: relative;
    z-index: 30002;
    pointer-events: auto;
}

.ent-ai-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.16);
    background: #f8fafc;
}

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

.ent-ai-title {
    font-size: 13px;
    color: #111827;
    font-weight: 700;
}

.ent-ai-sub {
    font-size: 12px;
    color: var(--ent-sub);
}

.ent-ai-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ent-ai-card {
    border-radius: 12px;
    border: 1px solid rgba(162, 221, 238, 0.12);
    background: #ffffff;
    padding: 10px;
}

.ent-ai-card-title {
    font-size: 12px;
    color: #1f2937;
    margin-bottom: 6px;
}

.ent-ai-card-body {
    font-size: 12px;
    color: #111827;
    line-height: 1.5;
    max-height: 120px;
    overflow: auto;
}

@media (max-width: 760px) {
    .ent-ai-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .ent-ansost-search {
        grid-template-columns: 1fr 1fr;
    }
    .ent-ansost-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1400px) {
    .ent-grid {
        grid-template-columns: 280px minmax(0, 1fr) 280px;
    }
}

@media (max-width: 1200px) {
    .ent-grid {
        grid-template-columns: 1fr;
    }
    .ent-col {
        max-height: none;
    }
}

@media (max-width: 760px) {
    .ent-topbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .ent-actions {
        width: 100%;
    }
    .ent-actions .ent-btn {
        flex: 1;
    }
    .ent-grid-form {
        grid-template-columns: 1fr;
    }
    .ent-col-2 {
        grid-column: span 1;
    }
}
