@charset "UTF-8";

:root {
    --portal-bg: #f3f5f7;
    --surface: #ffffff;
    --line: #d8dee4;
    --text: #17212b;
    --muted: #5f6b76;
    --brand: #1f7a5c;
    --shadow: 0 18px 40px rgba(23, 33, 43, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Malgun Gothic", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(31, 122, 92, 0.12), transparent 28%),
        linear-gradient(180deg, #fbfcfd 0%, var(--portal-bg) 100%);
}

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

.portal-body {
    min-height: 100vh;
}

.shell {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.eyebrow {
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--brand);
}

.portal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(251, 252, 253, 0.82);
    border-bottom: 1px solid rgba(216, 222, 228, 0.7);
}

.portal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 0 12px;
}

.portal-brand {
    display: grid;
    gap: 4px;
    min-width: 140px;
}

.portal-brand-title,
.brand-title {
    margin: 6px 0 0;
    font-size: 28px;
}

.portal-brand-title {
    margin: 0;
}

.portal-menu {
    align-items: center;
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.portal-menu-link,
.portal-category-link {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    min-height: 36px;
    padding: 0 12px;
}

.portal-menu-link:hover,
.portal-menu-link.is-active,
.portal-category-link:hover,
.portal-category-link.is-active {
    background: rgba(31, 122, 92, 0.09);
    border-color: rgba(31, 122, 92, 0.22);
    color: var(--brand);
}

.portal-category-nav {
    align-items: center;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 14px;
    white-space: nowrap;
}

.portal-category-nav span {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
}

.portal-category-link {
    background: #fff;
    flex: 0 0 auto;
    min-height: 32px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-user {
    color: var(--muted);
    font-size: 14px;
}

.portal-main {
    padding: 36px 0 72px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
}

.hero-copy,
.hero-panel,
.section-card,
.login-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(216, 222, 228, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.hero-copy {
    padding: 36px;
}

.hero-copy h2 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 26px;
    flex-wrap: wrap;
}

.hero-panel {
    padding: 28px;
}

.hero-panel-head,
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.hero-panel-head strong,
.section-head h3 {
    margin: 0;
    font-size: 18px;
}

.hero-panel-head span,
.section-head span {
    color: var(--muted);
    font-size: 13px;
}

.metric-list,
.board-list,
.post-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.metric-card,
.board-item,
.post-item,
.topic-item {
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 1px solid var(--line);
}

.metric-card strong,
.board-item strong,
.post-item strong,
.topic-item strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.metric-card p,
.board-item p,
.post-item p,
.topic-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.metric-card span,
.board-item span,
.post-item span,
.topic-item span {
    display: inline-block;
    margin-top: 10px;
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.board-content {
    color: var(--text);
    line-height: 1.75;
}

.board-content img {
    height: auto;
    max-width: 100%;
}

.board-content table {
    border-collapse: collapse;
    margin: 16px 0;
    width: 100%;
}

.board-content th,
.board-content td {
    border: 1px solid var(--line);
    padding: 10px 12px;
}

.board-media-embed {
    aspect-ratio: 16 / 9;
    background: #0f172a;
    margin: 16px 0;
    overflow: hidden;
    width: 100%;
}

.board-media-embed iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

.board-form .ck-editor__editable {
    min-height: 320px;
}

.board-form {
    display: grid;
    gap: 18px;
}

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

.board-form-options {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.board-form-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.category-tabs {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.category-chip {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: inline-flex;
    font-size: 14px;
    font-weight: 700;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
}

.category-chip.is-active,
.category-chip:hover {
    border-color: rgba(31, 122, 92, 0.35);
    color: var(--brand);
}

.category-chip span,
.post-badge {
    background: rgba(31, 122, 92, 0.1);
    border-radius: 8px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 7px;
}

.post-badge {
    display: inline-flex;
    margin: 0 0 10px;
}

.video-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.section-head + .video-grid {
    margin-top: 18px;
}

.video-item {
    border: 1px solid var(--line);
    background: var(--surface);
    display: grid;
    gap: 10px;
    padding: 16px;
}

.video-thumb-link {
    background: #0f172a;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.video-thumbnail {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    color: #fff;
    display: grid;
    justify-items: center;
    padding: 18px;
    position: relative;
    width: 100%;
}

.video-thumbnail-badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    left: 14px;
    padding: 4px 8px;
    position: absolute;
    top: 14px;
}

.video-thumbnail-play {
    border-bottom: 18px solid transparent;
    border-left: 28px solid #fff;
    border-top: 18px solid transparent;
    display: block;
    height: 0;
    width: 0;
}

.video-thumbnail-copy {
    bottom: 14px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 700;
    position: absolute;
}

.video-item strong {
    font-size: 16px;
}

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

.video-item > span {
    color: var(--brand);
    font-size: 13px;
    font-weight: 700;
}

.webvideo-library {
    display: grid;
    gap: 22px;
}

.webvideo-library-head {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.webvideo-library-kicker {
    color: var(--brand);
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.webvideo-library-head h3 {
    margin: 8px 0 0;
    font-size: 22px;
}

.webvideo-library-count {
    align-items: center;
    background: rgba(31, 122, 92, 0.08);
    border: 1px solid rgba(31, 122, 92, 0.18);
    border-radius: 999px;
    color: var(--brand);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    min-height: 34px;
    padding: 0 12px;
    white-space: nowrap;
}

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

.webvideo-list-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfa 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(23, 33, 43, 0.05);
    display: grid;
    gap: 12px;
    overflow: hidden;
    padding: 12px;
}

.webvideo-list-thumb {
    background: #0f172a;
    border-radius: 14px;
    display: block;
    overflow: hidden;
}

.webvideo-list-thumb-inner {
    align-items: center;
    aspect-ratio: 16 / 9;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 34%),
        linear-gradient(160deg, #132033 0%, #0f172a 64%, #12253f 100%);
    color: #fff;
    display: grid;
    justify-items: center;
    padding: 14px;
    position: relative;
}

.webvideo-list-badge {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    left: 12px;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    position: absolute;
    top: 12px;
}

.webvideo-list-play {
    border-bottom: 14px solid transparent;
    border-left: 22px solid #fff;
    border-top: 14px solid transparent;
    display: block;
    height: 0;
    margin-left: 4px;
    width: 0;
}

.webvideo-list-hint {
    bottom: 12px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 700;
    position: absolute;
}

.webvideo-list-body {
    display: grid;
    gap: 10px;
}

.webvideo-list-title {
    font-size: 16px;
    line-height: 1.4;
    margin: 0;
}

.webvideo-list-description {
    color: var(--muted);
    display: -webkit-box;
    line-height: 1.55;
    margin: 0;
    min-height: 46px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.webvideo-list-meta,
.webvideo-list-footer {
    align-items: center;
    color: var(--muted);
    display: flex;
    font-size: 12px;
    font-weight: 700;
    gap: 10px;
    justify-content: space-between;
}

.webvideo-list-meta span,
.webvideo-list-footer span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.webvideo-list-footer {
    border-top: 1px solid rgba(216, 222, 228, 0.9);
    padding-top: 10px;
}

.webvideo-list-footer a {
    color: var(--brand);
    white-space: nowrap;
}

.webvideo-detail-card {
    display: grid;
    gap: 16px;
}

.webvideo-player-shell {
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}

.webvideo-player-shell .video-js {
    display: block;
    font-size: 14px;
    width: 100%;
}

.webvideo-player-shell .vjs-big-play-button {
    border-radius: 8px;
}

.webvideo-player-shell .vjs-control-bar {
    background: rgba(15, 23, 42, 0.82);
}

.webvideo-description {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.webvideo-file-meta {
    color: var(--brand);
    display: inline-block;
    font-weight: 700;
}

.webvideo-dropzone {
    align-items: center;
    border: 1px dashed rgba(31, 122, 92, 0.48);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    min-height: 112px;
    padding: 18px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.webvideo-dropzone:focus,
.webvideo-dropzone.is-dragover {
    background: rgba(31, 122, 92, 0.08);
    border-color: var(--brand);
    outline: none;
}

.webvideo-dropzone-copy {
    display: grid;
    gap: 6px;
}

.webvideo-dropzone-copy strong {
    font-size: 16px;
}

.webvideo-dropzone-copy span,
.webvideo-form-message {
    color: var(--muted);
    font-size: 14px;
}

.webvideo-form-message {
    margin: -8px 0 0;
}

.webvideo-form-message.is-error {
    color: #b33a3a;
    font-weight: 700;
}

.webvideo-file-input {
    height: 1px;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 1px;
}

.content-section {
    margin-top: 26px;
}

.portal-content-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
}

.content-column,
.side-column {
    display: grid;
    gap: 24px;
}

.section-card {
    padding: 28px;
}

.board-item {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.btn-light {
    background: #fff;
    color: var(--text);
    border-color: var(--line);
}

.btn-ghost {
    background: transparent;
    color: var(--brand);
    border-color: rgba(31, 122, 92, 0.28);
}

.btn-block {
    width: 100%;
}

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

.login-panel {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    overflow: hidden;
}

.login-copy {
    padding: 42px;
    background: linear-gradient(160deg, #17212b 0%, #24483a 100%);
    color: #fff;
}

.login-copy h1 {
    margin: 14px 0 16px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
}

.login-copy p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.login-form {
    padding: 42px;
    display: grid;
    gap: 14px;
    align-content: center;
}

.form-label {
    font-size: 14px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-size: 15px;
}

.form-select {
    cursor: pointer;
}

.file-wrapper {
    display: grid;
    gap: 8px;
}

.drop-zone {
    background: #f8fbfa;
    border: 1px dashed rgba(31, 122, 92, 0.45);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    min-height: 112px;
    padding: 16px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.drop-zone.highlight {
    background: rgba(31, 122, 92, 0.08);
    border-color: var(--brand);
}

.drop-zone.has-files {
    background: #fff;
    border-style: solid;
}

.drop-zone-content {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: auto 1fr auto;
    min-height: 78px;
}

.icon-wrapper {
    align-items: center;
    background: #e9f7ef;
    border-radius: 8px;
    display: inline-flex;
    height: 46px;
    justify-content: center;
    width: 46px;
}

.upload-icon {
    display: block;
    fill: var(--brand);
    height: 28px;
    width: 28px;
}

.main-prompt,
.sub-prompt,
.file-comment {
    margin: 0;
}

.main-prompt {
    font-size: 15px;
    font-weight: 700;
}

.sub-prompt,
.file-comment {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.btn-premium-upload,
.file-wrapper .btn-admin,
.btn-download {
    align-items: center;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 36px;
    padding: 0 12px;
    text-decoration: none;
    white-space: nowrap;
}

.btn-premium-upload {
    background: var(--brand);
    border: 1px solid var(--brand);
    color: #fff;
}

.file-wrapper .btn-admin,
.btn-download {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--text);
}

.file-wrapper .btn-delete {
    border-color: #f1caca;
    color: #b33a3a;
}

.file-list-container {
    display: none;
}

.file-list-container.has-files {
    display: grid;
    gap: 10px;
}

.file-list-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.file-list-header > span {
    font-size: 14px;
    font-weight: 700;
}

.header-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.file-items-area {
    display: grid;
    gap: 8px;
}

.file-item {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px 12px;
}

.file-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-size,
.file-item .status {
    color: var(--muted);
    flex: 0 0 auto;
    font-size: 12px;
    white-space: nowrap;
}

.btn-item-del {
    align-items: center;
    background: #fff0f0;
    border: 1px solid #f1caca;
    border-radius: 8px;
    color: #b33a3a;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 auto;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.u-hidden {
    display: none !important;
}

.text-link {
    color: var(--brand);
    font-size: 14px;
    text-align: center;
}

.form-message {
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.form-message.success {
    background: #e9f7ef;
    color: #1f7a5c;
    border: 1px solid #c9e8d8;
}

.form-message.error {
    background: #fff0f0;
    color: #b33a3a;
    border: 1px solid #f1caca;
}

@media (max-width: 960px) {
    .hero-grid,
    .portal-content-grid,
    .login-panel {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 640px) {
    .shell {
        width: calc(100% - 24px);
    }

    .portal-nav {
        display: grid;
        grid-template-columns: 1fr auto;
        padding: 12px 0 8px;
        gap: 12px;
    }

    .portal-brand {
        grid-column: 1;
        grid-row: 1;
        min-width: auto;
    }

    .portal-brand-title {
        font-size: 20px;
    }

    .eyebrow {
        font-size: 10px;
    }

    .nav-actions {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .portal-menu {
        grid-column: 1 / -1;
        grid-row: 2;
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        white-space: nowrap;
        padding: 4px 0;
        gap: 6px;
        scrollbar-width: none;
        margin: 0 -12px; /* Allow scroll to edge of screen */
        padding: 4px 12px;
    }

    .portal-menu::-webkit-scrollbar {
        display: none;
    }

    .portal-menu-link {
        flex: 0 0 auto;
        min-height: 32px;
        font-size: 13px;
        padding: 0 10px;
        justify-content: center;
    }

    .nav-user {
        font-size: 12px;
    }

    .hero-actions,
    .webvideo-dropzone {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-category-link {
        justify-content: center;
    }

    .hero-copy,
    .hero-panel,
    .section-card,
    .login-copy,
    .login-form {
        padding: 22px;
    }

    .webvideo-library-head,
    .webvideo-list-meta,
    .webvideo-list-footer {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .file-list-header,
    .file-item {
        align-items: stretch;
        flex-direction: column;
    }

    .header-controls {
        justify-content: flex-start;
    }
}
