@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable.min.css');

/* --- 디자인 토큰 --- */
:root {
  --color-black: #0c0c0c;
  --color-dark-grey: #404040;
  --color-grey: #808080;
  --color-light-grey: #EAEAEA;
  --color-lighter-grey: #F5F5F5;
  --color-white: #FBFBFB;

  --color-red: #e35757;
  --color-orange: #ff9466;
  --color-salmon: #ffb8ac;
  --color-yellow: #fedc7e;
  --color-yellow-green: #beeb90;
  --color-light-yellow-green: #ddf3bb;
  --color-sky-blue: #b2e0f6;
  --color-blue: #355fe9;
  --color-dark-blue: #2D438B;
  --color-purple: #a869c4;
  --color-light-pink: #ffdaee;
  --color-pink: #ffafdb;
  --color-brown: #9e5d49;
  --color-light-brown: #e9b784;
  --color-dark-red: #b53535;
  --color-light-yellow: #ffeda4;
  --color-green: #17773c;
  --color-dark-purple: #6e3188;

  --font-title: 24px;
  --font-subtitle: 16px;
  --font-text: 12px;
  --font-button: 12px;

  --shadow-default: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);

  --font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
}
h2{font-weight: 500;}

.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}
.font-text{
    font-size: var(--font-text);
}
.font-subtitle{
    font-size: var(--font-subtitle);
}
.font-title{
    font-size: var(--font-title);
}

/* --- 사이드바 --- */
.sidebar {
    width: 240px;
    background-color: var(--color-dark-grey);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: width 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    white-space: nowrap;
    z-index: 6;
}

.sidebar.collapsed {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border-right: none;
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-dark-grey);
    transition: transform 0.3s ease;
}

.btn-toggle-sidebar img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.btn-toggle-sidebar.rotated {
    transform: rotate(180deg);
}

.sidebar-logo {
    padding: 24px;
    letter-spacing: 1px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
}

.sidebar-nav-guide {
    margin-top: 0;
}

/* 플래너 사용가이드 ↔ 홈 사이 40px */
.sidebar-nav-guide + li {
    margin-top: 40px;
}

.sidebar-nav li a,
.sidebar-bottom .settings-link,
.sidebar-bottom .org-chart-link,
.sidebar-bottom .logout-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: inherit;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-bottom .settings-link:hover,
.sidebar-bottom .org-chart-link:hover,
.sidebar-bottom .logout-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-nav > *{
    font-size: 14px;
}
.menu-toggle {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.submenu {
    display: none;
    background-color: transparent;
}

.submenu.open {
    display: block;
}

.submenu li a {
    padding: 10px 24px 10px 48px;
    color: var(--color-light-grey);
    font-size: 13px;
}

.sidebar-nav li a.active,
.sidebar-bottom .settings-link.active,
.sidebar-bottom .org-chart-link.active,
.sidebar-bottom .logout-link.active {
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 700;
    color: var(--color-white);
}

.sidebar .icon {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
    opacity: 0.8;
}

.sidebar-nav-noti-link {
    gap: 0;
}

.sidebar-nav-noti-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-nav-noti-dot {
    position: absolute;
    top: -1px;
    right: -1px;
    margin: 0;
}

.sidebar-nav-noti-label {
    flex: 0 1 auto;
    min-width: 0;
}

.sidebar-nav-noti-count {
    margin-left: 4px;
    font-size: 12px;
    font-weight: 500;
    color: var(--color-light-grey);
    flex-shrink: 0;
}

.sidebar-bottom {
    padding-bottom: 24px;
}

/* --- 메인 · 헤더 --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--color-white);
    overflow-y: auto;
}

.top-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 24px;
    background-color: var(--color-white);
    box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 10;
}

.top-header .header-right {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 32px;
    min-width: 0;
}

.planner-header-search {
    min-width: 320px;
}

.planner-header-search__field {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--color-dark-grey);
    border-radius: 4px;
    background-color: var(--color-white);
    box-sizing: border-box;
    cursor: text;
}

.planner-header-search.is-filled .planner-header-search__field,
.planner-header-search__field:focus-within {
    background-color: var(--color-light-grey);
}

.planner-header-search__icon {
    display: inline-flex;
    flex-shrink: 0;
    color: var(--color-dark-grey);
    line-height: 0;
}

.planner-header-search__input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    outline: none;
    padding: 0;
    margin: 0;
    font-size: var(--font-text);
    font-family: inherit;
    color: var(--color-dark-grey);
}

.planner-header-search__input::placeholder {
    color: var(--color-grey);
}

.planner-header-search__clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--color-dark-grey);
    font-size: var(--font-text);
    font-family: inherit;
    line-height: 1;
}

.planner-header-search__clear[hidden] {
    display: none;
}

.planner-header-search__clear-icon {
    display: inline-flex;
    line-height: 0;
}

.planner-header-search__clear-img {
    display: block;
    width: 16px;
    height: 16px;
}

.planner-header-search__clear-text {
    font-size: var(--font-text);
    font-weight: 400;
}

.planner-header-search__clear:hover {
    color: var(--color-dark-grey);
}

.header-right .user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-dept {
    font-size: var(--font-text);
    font-weight: 500;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--color-green);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
}

.greeting-banner {
    background-color: var(--color-light-grey);
    padding: 24px 0 0 24px;
    text-align: center;
}
.title{
    font-size: 16px;
}

.page-content {
    padding: 24px;
    padding-bottom: 0;
    flex: 1;
    background-color: var(--color-light-grey);
}

.sidebar-overlay {
    display: none;
}

.filter-icon{
    display: flex;
    gap: 16px;
    color: var(--color-dark-grey);
    cursor: pointer;
    align-items: flex-end;
    font-size: var(--font-text);
}
/* --- 모바일 (768px) --- */
@media screen and (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 240px;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 998;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .page-content {
        padding: 16px;
    }

    .top-header {
        padding: 10px 16px;
    }
}
