:root {
    --bg: #f6f7f9;
    --card: #ffffff;
    --line: #e5e7eb;
    --text: #111827;
    --muted: #6b7280;
    --primary: #111111;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, "Noto Sans KR", sans-serif;
}

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

.sidebar {
    width: 260px;
    border-right: 1px solid #e6e6e6;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
}

.logo-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0px 0px 25px 0;
    padding: 0 0 0 10px;
}

.logo {
    width: auto;
    height: 30px;
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.logo a {
    display: inline-flex;
    align-items: center;
    height: 100%;
}

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

.logo-menu-btn {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.logo-menu-btn:hover {
    background: #e8eaee;
    color: #111827;
}

.logo-menu-btn.is-open {
    background: #e5e7eb;
    color: #111827;
}

.logo-menu-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

.logo-menu-layer {
    position: absolute;
    top: -4px;
    left: calc(100% + 10px);
    right: auto;
    width: 325px;
    background: #fff;
    border: 1px solid #dddfe3;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.12);
    padding: 8px;
    display: none;
    z-index: 20;
}

.logo-menu-layer.is-open {
    display: block;
}

.layer-item {
    width: 100%;
    border: 0;
    background: transparent;
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    border-radius: 10px;
    color: #3f3f46;
    font-size: 15px;
    text-align: left;
    cursor: pointer;
}

.layer-item:hover {
    background: #f3f4f6;
}

.layer-item.is-selected {
    background: #eceef2;
    color: #111827;
}

.layer-item.is-disabled,
.layer-item:disabled {
    color: #a1a1aa;
    cursor: not-allowed;
}

.layer-item.is-disabled:hover,
.layer-item:disabled:hover {
    background: transparent;
}

.layer-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    color: #71717a;
    font-size: 14px;
}

.layer-shortcut {
    color: #71717a;
    font-size: 13px;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.menu-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-title {
    margin: 0 0 0px;
    padding: 0 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: #9aa0a8;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.menu-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-plus {
    width: 20px;
    height: 20px;
    border: 0;
    background: transparent;
    color: #9aa0a8;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.menu-plus:hover {
    background: #e8eaee;
}

.menu-secondary {
    margin-top: auto;
    border-top: 1px solid #e1e4e8;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-admin {
    border-top: 1px solid #e1e4e8;
    margin-top: 10px;
    padding-top: 10px;
}

.menu-item {
    color: #4b5563;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: #e8eaee;
    color: #111827;
}

.menu-item.is-active {
    background: #e5e7eb;
    color: #111827;
}

.menu-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8b919a;
    flex: 0 0 14px;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 28px;
}

.header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.meta {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 13px;
}

h1 {
    margin: 0;
    font-size: 30px;
}

.tabs {
    display: flex;
    align-items: flex-end;
    gap: 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 24px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #6b7280;
    padding: 10px 4px;
    line-height: 1.2;
}

.tab-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tab-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.tab.active {
    color: #111827;
    border-bottom: 2px solid #111827;
}

.tab-pane {
    display: none;
}

.tab-pane.is-active {
    display: block;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.filter-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
}

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.filter-options {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 700;
    width: 120px;
    height: 80px;
    padding: 12px;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.filter-chip:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.filter-chip.is-active {
    border: 2px solid #111827;
    color: #111827;
    padding: 11px;
}

.filter-chip-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.filter-chip-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.filter-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.filter-input {
    min-width: 260px;
    height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    color: #111827;
    outline: none;
}

.filter-input:focus {
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.14);
}

.filter-help {
    margin-top: 12px;
}

.search-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
}

.filter-item {
    position: relative;
}

.filter-pill {
    border: 1px solid #1f2937;
    background: #111827;
    color: #f9fafb;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.filter-pill.is-open {
    box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.2);
}

.pill-icon {
    font-size: 12px;
    opacity: 0.95;
}

.pill-caret {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
}

.pill-caret svg {
    width: 14px;
    height: 14px;
    display: block;
}

.filter-popover {
    margin-top: 0;
    width: 360px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12);
    padding: 14px;
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 20;
}

.filter-popover.is-open {
    display: block;
}

.filter-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.filter-popover-head h3 {
    margin: 0;
    font-size: 36px;
}

.filter-clear-btn {
    border: 0;
    background: transparent;
    color: #7c3aed;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.filter-mode-switch {
    background: #ececf0;
    border-radius: 12px;
    padding: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-bottom: 14px;
}

.mode-btn {
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 20px;
    font-weight: 700;
    color: #6b7280;
    cursor: pointer;
}

.mode-btn.is-active {
    background: #fff;
    color: #111827;
}

.status-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.status-item {
    border: 0;
    background: transparent;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    color: #4b5563;
    font-size: 30px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.status-item:hover {
    background: #f3f4f6;
}

.status-item.is-selected {
    background: #efe7ff;
    color: #7c3aed;
}

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

.program-header {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.program-logo {
    width: 47px;
    height: 47px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4285f4;
    font-size: 14px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 47px;
}

.program-header-text {
    min-width: 0;
}

.program-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.program-meta-line {
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    color: #6b7280;
    font-size: 12px;
}

.meta-company {
    color: #6b7280;
    font-weight: 600;
}

.meta-dot {
    color: #9ca3af;
}

.meta-badge {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.4;
}

.badge-amber {
    background: #fff4cc;
    color: #8a6b00;
}

.badge-violet {
    background: #f3e8ff;
    color: #7c3aed;
}

.badge-sky {
    background: #e0f2fe;
    color: #0369a1;
}

h2 {
    margin: 0;
    font-size: 20px;
}

h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.muted {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

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

.metric-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}

.label {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.value {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.value span {
    font-size: 13px;
    color: var(--muted);
}

.list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

.list li {
    border-left: 4px solid #6366f1;
    padding: 10px 12px;
    background: #fafafa;
}

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

.columns .full-width {
    grid-column: 1 / -1;
}

.qa {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.qa:last-of-type {
    border-bottom: 0;
}

.input-mock {
    margin-top: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #f3f4f6;
    color: var(--muted);
    font-size: 14px;
}

.btn {
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.btn.small {
    padding: 7px 10px;
    font-size: 13px;
}

.icon-only-btn {
    width: 35px;
    height: 35px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
}

.icon-only-btn:hover {
    color: #111827;
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn-outline {
    background: #fff;
    border-color: #d1d5db;
    color: #374151;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(17, 24, 39, 0.22);
    transform: translateY(-1px);
}

.btn-icon {
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.icon-only-btn .btn-icon {
    width: 23px;
    height: 23px;
}

.icon-only-btn .btn-icon svg {
    width: 23px;
    height: 23px;
}

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

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

@media (max-width: 760px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .header {
        flex-direction: column;
    }

    .logo-menu-layer {
        top: calc(100% + 8px);
        left: auto;
        right: 0;
        width: min(325px, calc(100vw - 32px));
    }

    .filter-search {
        width: 100%;
        margin-left: 0;
    }

    .filter-input {
        min-width: 0;
        width: 100%;
    }

    .filter-popover {
        width: 100%;
        position: absolute;
        left: 0;
        right: auto;
    }
}

