/*
 * 자향한방병원 인트라넷 — Main v2 Design
 * Notion / Linear / Toss 스타일 미니멀 디자인
 * 2026-04-02
 */

/* ===== Reset & Variables ===== */
:root {
    --v2-text: #1A1A1A;
    --v2-text-sub: #666;
    --v2-text-muted: #999;
    --v2-bg: #F7F8FA;
    --v2-bg-card: #FFFFFF;
    --v2-border: #E8E8E8;
    --v2-border-light: #F0F0F0;
    --v2-accent: #3B82F6;
    --v2-accent-light: #EFF6FF;
    --v2-radius: 12px;
    --v2-radius-sm: 8px;
    --v2-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
    --v2-shadow-hover: 0 4px 12px rgba(0,0,0,0.06);
    --v2-transition: 0.15s ease;
}

* { box-sizing: border-box; }

body.v2-body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--v2-bg);
    color: var(--v2-text);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* body padding for header */
.v2-body.has-main-header {
    padding-top: 72px;
}

/* ===== Main Layout ===== */
.v2-main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 30px 60px;
}

/* ===== Greeting + Notice Row ===== */
.v2-greeting-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 16px;
}

.v2-greeting {
    flex-shrink: 0;
}

.v2-notice-area {
    flex: 1;
    max-width: 480px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 14px 18px;
}

.v2-notice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.v2-notice-title {
    font-size: 13px;
    font-weight: 600;
    color: #5B7FC7;
}

.v2-notice-title i {
    margin-right: 6px;
}

.v2-notice-edit-btn {
    background: none;
    border: none;
    color: #9CA3AF;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.v2-notice-edit-btn:hover {
    background: #F3F4F6;
    color: #4B5563;
}

.v2-notice-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.v2-notice-item {
    font-size: 13px;
    color: #4B5563;
    padding: 4px 0;
    border-bottom: 1px solid #F3F4F6;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-notice-item:last-child {
    border-bottom: none;
}

.v2-notice-empty {
    font-size: 13px;
    color: #9CA3AF;
    text-align: center;
    padding: 8px 0;
}

/* Desktop only */
.v2-desktop-only {
    display: flex;
}

/* ===== Notice Modal ===== */
.v2-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.v2-modal {
    background: #fff;
    border-radius: 16px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.v2-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #E5E7EB;
}

.v2-modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1A1A1A;
    margin: 0;
}

.v2-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
}

.v2-modal-close:hover {
    color: #4B5563;
}

.v2-modal-body {
    padding: 20px 24px 24px;
}

.v2-notice-manage-item {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.v2-notice-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.v2-notice-input:focus {
    border-color: #5B7FC7;
    box-shadow: 0 0 0 3px rgba(91, 127, 199, 0.1);
}

.v2-notice-add {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.v2-notice-add-btn {
    background: #EDF2FE;
    color: #5B7FC7;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.v2-notice-add-btn:hover {
    background: #DBEAFE;
    color: #3B6FD6;
}

.v2-notice-save-btn {
    background: #EDF2FE;
    color: #5B7FC7;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-notice-save-btn:hover {
    background: #DBEAFE;
}

.v2-notice-del-btn {
    background: #F3F4F6;
    color: #9CA3AF;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.v2-notice-del-btn:hover {
    background: #FEE2E2;
    color: #EF4444;
}

/* ===== Asset Edit Button ===== */
.v2-menu-item-wrap {
    position: relative;
}

.v2-asset-edit {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #F3F4F6;
    border: none;
    color: #9CA3AF;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 5;
}

.v2-asset-edit:hover {
    background: #E5E7EB;
    color: #4B5563;
}

.v2-banner-wrap {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.v2-banner-wrap .v2-banner {
    flex: 1;
    margin-bottom: 0;
}

.v2-greeting h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--v2-text);
    margin: 0 0 6px;
    letter-spacing: -0.5px;
}

.v2-greeting p {
    font-size: 15px;
    color: var(--v2-text-muted);
    margin: 0;
}

/* ===== Dashboard Grid ===== */
.v2-dashboard {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

/* ===== Section Card ===== */
.v2-card {
    background: var(--v2-bg-card);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    overflow: hidden;
}

.v2-card-header {
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.v2-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--v2-text);
    margin: 0;
    letter-spacing: -0.3px;
}

.v2-card-header .v2-badge {
    font-size: 12px;
    color: var(--v2-text-muted);
    background: var(--v2-bg);
    padding: 3px 10px;
    border-radius: 10px;
}

.v2-card-body {
    padding: 0 20px 20px;
}

/* ===== Quick Menu Grid ===== */
.v2-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.v2-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 12px 20px;
    border-radius: var(--v2-radius);
    text-decoration: none;
    color: var(--v2-text);
    transition: all var(--v2-transition);
    position: relative;
}

.v2-menu-item:hover {
    background: var(--v2-bg);
    text-decoration: none;
    color: var(--v2-text);
}

.v2-menu-icon {
    width: 76px;
    height: 76px;
    border-radius: 18px;
    background: #EDF2FE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #5B7FC7;
    margin-bottom: 12px;
    transition: all var(--v2-transition);
}

.v2-menu-item:hover .v2-menu-icon {
    background: #DBEAFE;
    color: #3B6FD6;
}

.v2-menu-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--v2-text);
    text-align: center;
    line-height: 1.4;
    word-break: keep-all;
}

/* ===== Category Section ===== */
.v2-category {
    margin-bottom: 12px;
}

.v2-category:last-child {
    margin-bottom: 0;
}

.v2-category-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--v2-text-muted);
    letter-spacing: 0.3px;
    margin-bottom: 10px;
    padding-left: 4px;
}

/* ===== Sidebar ===== */
.v2-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Calendar Widget */
.v2-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    margin-bottom: 12px;
}

.v2-calendar-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.v2-cal-nav {
    display: flex;
    gap: 4px;
}

.v2-cal-nav button {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--v2-bg);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: var(--v2-text-sub);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--v2-transition);
}

.v2-cal-nav button:hover {
    background: var(--v2-border);
}

.v2-mini-cal {
    width: 100%;
    border-collapse: collapse;
}

.v2-mini-cal th {
    font-size: 12px;
    font-weight: 500;
    color: var(--v2-text-muted);
    padding: 8px 0;
    text-align: center;
}

.v2-mini-cal th:first-child { color: #EF4444; }
.v2-mini-cal th:last-child { color: var(--v2-accent); }

.v2-mini-cal td {
    font-size: 13px;
    color: var(--v2-text);
    padding: 0;
    text-align: center;
    cursor: pointer;
    position: relative;
    height: 40px;
    vertical-align: middle;
}

.v2-mini-cal td > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: background var(--v2-transition);
}

.v2-mini-cal td:hover > span {
    background: var(--v2-bg);
}

.v2-mini-cal td.today > span {
    background: var(--v2-accent);
    color: #fff;
    font-weight: 600;
}

.v2-mini-cal td.other-month {
    color: var(--v2-text-muted);
    opacity: 0.4;
}

.v2-mini-cal td.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--v2-accent);
}

/* Events List */
.v2-event-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.v2-event-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--v2-text-sub);
}

.v2-event-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.v2-event-dot.birthday { background: #3B82F6; }
.v2-event-dot.hospital { background: #22C55E; }
.v2-event-dot.anniversary { background: #F59E0B; }

/* ===== Suggestion & Interview ===== */
.v2-forms-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.v2-form-card {
    background: var(--v2-bg-card);
    border: 1px solid var(--v2-border);
    border-radius: var(--v2-radius);
    padding: 24px;
}

.v2-form-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: var(--v2-text);
}

.v2-form-card p {
    font-size: 13px;
    color: var(--v2-text-muted);
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--v2-border-light);
}

.v2-form-card label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--v2-text-sub);
    margin-bottom: 5px;
}

.v2-form-card label .req {
    color: #EF4444;
}

.v2-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--v2-border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--v2-text);
    background: var(--v2-bg-card);
    transition: border-color var(--v2-transition);
    margin-bottom: 10px;
}

.v2-input:focus {
    outline: none;
    border-color: var(--v2-accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea.v2-input {
    resize: vertical;
    min-height: 60px;
}

select.v2-input {
    cursor: pointer;
}

.v2-form-group {
    margin-bottom: 10px;
}

.v2-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--v2-transition);
}

.v2-btn-primary {
    background: transparent;
    color: #444;
    border: 1.5px solid #444;
    border-radius: 20px;
    padding: 9px 28px;
}

.v2-btn-primary:hover {
    background: #444;
    color: #fff;
}

.v2-btn-secondary {
    background: var(--v2-bg);
    color: var(--v2-text-sub);
    border: 1px solid var(--v2-border);
}

.v2-btn-secondary:hover {
    background: var(--v2-border);
}

/* ===== Notice Widget ===== */
.v2-notice-list {
    display: flex;
    flex-direction: column;
}

.v2-notice-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--v2-border-light);
    text-decoration: none;
    color: var(--v2-text);
    transition: all var(--v2-transition);
}

.v2-notice-item:last-child {
    border-bottom: none;
}

.v2-notice-item:hover {
    color: var(--v2-accent);
    text-decoration: none;
}

.v2-notice-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #EDF2FE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #5B7FC7;
    flex-shrink: 0;
}

.v2-notice-text {
    flex: 1;
    min-width: 0;
}

.v2-notice-text span {
    display: block;
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v2-notice-text small {
    font-size: 12px;
    color: var(--v2-text-muted);
}

/* ===== Core Values Section ===== */
.v2-values-section {
    max-width: 1300px;
    margin: 40px auto 0;
    padding: 0 30px;
}

.v2-values-inner {
    background: #5A8A9A;
    border-radius: var(--v2-radius);
    padding: 48px 40px;
}

.v2-values-title {
    text-align: center;
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 40px;
    line-height: 1.4;
}

.v2-values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.v2-value-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--v2-radius);
    padding: 28px 24px;
}

.v2-value-item h4 {
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.v2-value-item p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
    line-height: 1.7;
}

/* ===== Footer ===== */
.v2-footer {
    max-width: 1300px;
    margin: 0 auto;
    padding: 24px 30px;
}

.v2-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--v2-text-muted);
}

.v2-footer-links {
    display: flex;
    gap: 16px;
}

.v2-footer-links a {
    color: var(--v2-text-muted);
    text-decoration: none;
    transition: color var(--v2-transition);
}

.v2-footer-links a:hover {
    color: var(--v2-text);
}

/* ===== Fire Safety Banner ===== */
.v2-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: var(--v2-radius-sm);
    margin-bottom: 20px;
    text-decoration: none;
    color: #166534;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--v2-transition);
}

.v2-banner:hover {
    background: #DCFCE7;
    text-decoration: none;
    color: #166534;
}

.v2-banner i {
    font-size: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .v2-dashboard {
        grid-template-columns: 1fr;
    }
    .v2-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* 로그인 버튼 — 연한 파란 스타일 */
.v2-body .login-btn {
    background: #EDF2FE !important;
    color: #5B7FC7 !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 8px 18px !important;
    font-weight: 600;
    font-size: 14px;
}
.v2-body .login-btn:hover {
    background: #DBEAFE !important;
    color: #3B6FD6 !important;
}

@media (max-width: 768px) {
    .v2-body.has-main-header {
        padding-top: 56px;
    }
    .v2-main {
        padding: 16px 16px 40px;
    }
    .v2-greeting-row {
        flex-direction: column;
        gap: 12px;
    }
    .v2-notice-area {
        max-width: 100%;
    }
    .v2-desktop-only {
        display: none !important;
    }
    .v2-modal {
        width: 90%;
        margin: 0 auto;
    }
    .v2-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .v2-forms-row {
        grid-template-columns: 1fr;
    }
    .v2-sidebar {
        grid-template-columns: 1fr;
    }
    .v2-greeting h1 {
        font-size: 20px;
    }
    .v2-values-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .v2-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .v2-menu-item {
        padding: 14px 4px 12px;
    }
    .v2-menu-icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    .v2-menu-label {
        font-size: 12px;
    }
}
