﻿:root {
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Pretendard", "Noto Sans KR", sans-serif;
    line-height: 1.4;
    color: #102847;
    background:
        radial-gradient(circle at top left, rgba(44, 110, 213, 0.16), transparent 18%),
        linear-gradient(160deg, #f3f8ff, #e8f1ff);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
}

.layout-root {
    min-height: 100vh;
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 24px 18px;
    border-right: 1px solid rgba(215, 228, 243, 0.9);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.94)),
        #fff;
    display: grid;
    align-content: start;
    gap: 24px;
}

.sidebar-brand {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    text-decoration: none;
}

.sidebar-brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c6ed5, #184a9e);
    color: #fff;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.sidebar-brand-copy {
    display: grid;
    gap: 4px;
}

.sidebar-brand-copy strong {
    font-size: 15px;
    line-height: 1;
}

.sidebar-brand-copy span {
    font-size: 12px;
    color: #60728a;
}

.sidebar-nav {
    display: grid;
    gap: 6px;
}

.sidebar-link {
    min-height: 44px;
    border-radius: 14px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: #4d657d;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.sidebar-link:hover {
    background: #edf4ff;
    color: #1f57ab;
    transform: translateX(2px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #2c6ed5, #184a9e);
    color: #fff;
    box-shadow: 0 16px 30px rgba(24, 74, 158, 0.18);
}

.main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 1200;
    padding: 20px 24px 14px;
    border-bottom: 1px solid rgba(215, 228, 243, 0.72);
    background: rgba(248, 251, 255, 0.82);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar-context {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.topbar-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #60728a;
}

.topbar-title {
    font-size: 20px;
    line-height: 1.1;
}

.topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.topbar-user {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-width: 280px;
    padding: 8px 10px 8px 8px;
    border: 1px solid #d7e4f3;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

.topbar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4ff;
    color: #184a9e;
    font-weight: 900;
}

.topbar-user-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.topbar-user-copy strong {
    font-size: 13px;
}

.topbar-user-copy span {
    font-size: 12px;
    color: #60728a;
}

.topbar-logout {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #d7e4f3;
    background: #fff;
    color: #35557e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.topbar-help {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d7e4f3;
    background: #fff;
    color: #35557e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.content {
    min-width: 0;
    padding: 24px;
}

.content > .page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.content #topActions {
    display: none !important;
}

.layout-footer {
    padding-bottom: 12px;
}

.notification-widget {
    position: relative;
    display: inline-flex;
}

.notification-bell {
    position: relative;
    gap: 8px;
    width: auto;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 13px;
}

.notification-bell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.notification-bell-icon svg {
    width: 16px;
    height: 16px;
}

.notification-bell.has-unread {
    border-color: #7ea7e3;
    color: #184a9e;
    background: #edf4ff;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #b42318;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 24px));
    border: 1px solid #d7e4f3;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 48px rgba(20, 49, 99, 0.18);
    padding: 12px;
    display: none;
    z-index: 1400;
}

.notification-dropdown.open {
    display: block;
}

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

.notification-head strong {
    color: #102847;
    font-size: 14px;
}

.notification-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-refresh,
.notification-read-all {
    border: none;
    background: transparent;
    color: #2c6ed5;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.notification-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
}

.notification-item {
    width: 100%;
    border: 1px solid #e2ecf8;
    border-radius: 14px;
    background: #fff;
    padding: 12px;
    display: grid;
    gap: 6px;
    text-align: left;
    cursor: pointer;
}

.notification-item.unread {
    background: #f7faff;
    border-color: #cfe0f6;
}

.notification-item-title {
    font-size: 14px;
    font-weight: 800;
    color: #102847;
}

.notification-item-message {
    font-size: 13px;
    color: #496684;
    line-height: 1.45;
}

.notification-item-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #71849c;
    font-size: 11px;
}

.notification-empty {
    padding: 18px 12px;
    border: 1px dashed #d7e4f3;
    border-radius: 14px;
    background: #f9fbff;
    color: #60728a;
    text-align: center;
    font-size: 13px;
}

.app-footer {
    padding: 8px 16px 24px;
    text-align: center;
    color: #60728a;
    font-size: 12px;
    line-height: 1.6;
}

.app-footer strong {
    color: #102847;
}

body.help-open {
    overflow: hidden;
}

.help-overlay[hidden],
.help-panel[hidden] {
    display: none !important;
}

.help-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.34);
    z-index: 1500;
}

.help-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100vh;
    padding: 22px 20px;
    border-left: 1px solid #d7e4f3;
    background: #fff;
    box-shadow: -18px 0 48px rgba(15, 23, 42, 0.12);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 18px;
    z-index: 1510;
}

.help-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.help-panel-copy {
    display: grid;
    gap: 8px;
}

.help-panel-kicker {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #60728a;
}

.help-panel-copy strong {
    font-size: 20px;
    color: #102847;
}

.help-panel-copy p {
    margin: 0;
    color: #60728a;
    line-height: 1.6;
}

.help-panel-close,
.help-panel-link {
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid #d7e4f3;
    background: #fff;
    color: #35557e;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.help-panel-body {
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 14px;
    overflow: auto;
}

.help-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: #496684;
    line-height: 1.7;
}

@media (max-width: 1180px) {
    .app-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .topbar {
        padding-inline: 18px;
    }

    .content {
        padding: 18px;
    }
}

@media (max-width: 920px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 18px;
        border-right: none;
        border-bottom: 1px solid rgba(215, 228, 243, 0.9);
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .topbar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-tools {
        justify-content: stretch;
    }

    .topbar-user {
        min-width: 0;
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .topbar-logout {
        grid-column: 1 / -1;
    }

    .help-panel {
        width: min(100vw, 420px);
    }
}
