:root {
    --ink: #17202a;
    --muted: #6f7a86;
    --line: #dce4ea;
    --surface: #ffffff;
    --surface-soft: #f5f8fa;
    --brand: #17324d;
    --brand-strong: #0f2538;
    --teal: #278a78;
    --amber: #d78b2d;
    --blue: #5067a5;
    --red: #c44949;
    --green: #2f8f5b;
    --shadow: 0 20px 60px rgba(23, 32, 42, 0.14);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--ink);
    font-family: "Segoe UI", "Malgun Gothic", Arial, sans-serif;
    background: #f3f6f8;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

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

.auth-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background:
        linear-gradient(135deg, rgba(23, 50, 77, 0.22), transparent 42%),
        linear-gradient(315deg, rgba(39, 138, 120, 0.14), transparent 36%),
        url('/public/assets/images/bg-garden.png') center / cover no-repeat fixed;
}

@keyframes auth-enter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(340px, 1.08fr) minmax(360px, 520px);
    width: min(1120px, 100%);
    min-height: 680px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.50);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 40px 100px rgba(23, 32, 42, 0.28), 0 2px 0 rgba(255, 255, 255, 0.6);
    animation: auth-enter 0.55s cubic-bezier(0.22, 0.68, 0, 1.1) both;
}

.auth-shell--compact {
    grid-template-columns: minmax(320px, 520px);
    min-height: auto;
    border-radius: 20px;
}

.auth-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 34px;
    color: #f8fbfd;
    background:
        linear-gradient(145deg, rgba(14, 34, 52, 0.91), rgba(18, 72, 64, 0.88)),
        radial-gradient(circle at 75% 15%, rgba(215, 139, 45, 0.50), transparent 36%),
        url('/public/assets/images/bg-garden.png') center / cover no-repeat;
}

.auth-visual::after {
    position: absolute;
    inset: auto -12% -20% 18%;
    height: 330px;
    content: "";
    background: repeating-linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.11) 0,
        rgba(255, 255, 255, 0.11) 1px,
        transparent 1px,
        transparent 42px
    );
    transform: rotate(-8deg);
}

.brand {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand img,
.brand-icon svg {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.brand-icon {
    display: inline-flex;
    flex: 0 0 auto;
}

.brand--light {
    color: #ffffff;
}

.auth-visual__content {
    position: relative;
    z-index: 1;
    max-width: 560px;
}

.auth-visual h1 {
    margin: 12px 0 16px;
    font-size: 44px;
    line-height: 1.12;
}

.auth-visual p {
    max-width: 520px;
    color: rgba(248, 251, 253, 0.82);
    line-height: 1.7;
}

.system-preview {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 0.78fr;
    gap: 12px;
    align-items: end;
}

.preview-panel {
    min-height: 112px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.preview-panel span {
    display: block;
    width: 54px;
    height: 6px;
    margin-bottom: 22px;
    border-radius: 999px;
    background: var(--amber);
}

.preview-panel strong,
.preview-panel small {
    display: block;
}

.preview-panel small {
    margin-top: 8px;
    color: rgba(248, 251, 253, 0.72);
}

.preview-panel--sub {
    min-height: 86px;
    background: rgba(39, 138, 120, 0.34);
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 6vw, 56px);
    background: rgba(255, 252, 249, 0.98);
}

.form-heading {
    margin-bottom: 28px;
}

.form-heading h2,
.topbar h1,
.hero-band h2,
.panel h2,
.panel h3 {
    margin: 0;
}

.form-heading h2 {
    font-size: 32px;
}

.form-heading p:not(.eyebrow),
.muted {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.eyebrow {
    margin: 0;
    color: var(--teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.form-stack {
    display: grid;
    gap: 16px;
}

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

.field {
    display: grid;
    gap: 8px;
}

.field span,
.check-field {
    font-size: 14px;
    font-weight: 700;
}

.field input,
.field select,
.table-search,
.approval-actions input,
.approval-actions select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 14px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus,
.field select:focus,
.table-search:focus,
.approval-actions input:focus,
.approval-actions select:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(39, 138, 120, 0.14);
}

.field-error {
    color: var(--red);
    font-size: 13px;
    line-height: 1.45;
}

.check-field {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
    color: var(--ink);
    line-height: 1.55;
}

.check-field input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--teal);
}

.password-meter {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.password-meter span {
    height: 5px;
    border-radius: 999px;
    background: var(--line);
}

.password-meter[data-score="1"] span:nth-child(1) {
    background: var(--red);
}

.password-meter[data-score="2"] span:nth-child(-n+2) {
    background: var(--amber);
}

.password-meter[data-score="3"] span {
    background: var(--green);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    color: #ffffff;
    background: var(--brand);
    box-shadow: 0 12px 24px rgba(23, 50, 77, 0.18);
}

.button--primary:hover {
    background: var(--brand-strong);
}

.button--secondary {
    color: var(--brand);
    border-color: var(--line);
    background: #ffffff;
}

.button--ghost {
    color: var(--brand);
    background: var(--surface-soft);
}

.button--danger {
    color: #ffffff;
    background: var(--red);
}

.button--full {
    width: 100%;
}

.button[disabled] {
    cursor: progress;
    opacity: 0.72;
    transform: none;
}

.auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 4px;
}

.auth-actions .button {
    min-height: 50px;
    font-size: 15px;
    border-radius: 12px;
}

.auth-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 26px;
}

.auth-metrics div {
    padding: 14px;
    border: 1px solid rgba(220, 228, 234, 0.7);
    border-radius: 10px;
    background: rgba(255, 251, 245, 0.85);
    backdrop-filter: blur(4px);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.auth-metrics div:hover {
    box-shadow: 0 6px 18px rgba(23, 50, 77, 0.09);
    transform: translateY(-2px);
}

.auth-metrics strong,
.auth-metrics span {
    display: block;
}

.auth-metrics span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.form-link {
    margin: 22px 0 0;
    color: var(--muted);
    text-align: center;
}

.form-link a {
    color: var(--teal);
    font-weight: 800;
}

.auth-mobile-entry {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    margin-top: 24px;
    border: 1px solid rgba(220, 228, 234, 0.92);
    border-radius: 8px;
    padding: 14px;
    color: var(--brand);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(23, 50, 77, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.auth-mobile-entry:hover {
    border-color: rgba(39, 138, 120, 0.42);
    box-shadow: 0 14px 32px rgba(23, 50, 77, 0.13);
    transform: translateY(-1px);
}

.auth-mobile-entry__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    color: #ffffff;
    background: var(--brand);
}

.auth-mobile-entry__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-mobile-entry strong,
.auth-mobile-entry small {
    display: block;
}

.auth-mobile-entry strong {
    font-size: 16px;
}

.auth-mobile-entry small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.notice {
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 14px;
    color: var(--ink);
    background: var(--surface-soft);
}

.notice--success {
    border-color: rgba(47, 143, 91, 0.32);
    background: rgba(47, 143, 91, 0.10);
}

.notice--error {
    border-color: rgba(196, 73, 73, 0.32);
    background: rgba(196, 73, 73, 0.10);
}

.notice--warning {
    border-color: rgba(215, 139, 45, 0.36);
    background: rgba(215, 139, 45, 0.12);
}

.app-body {
    background: #eef3f6;
}

.app-shell {
    --sidebar-expanded-width: 240px;
    --sidebar-collapsed-width: 68px;
    display: grid;
    grid-template-columns: var(--sidebar-expanded-width) minmax(0, 1fr);
    min-height: 100vh;
    transition: grid-template-columns 0.18s ease;
}

.app-shell.is-sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    z-index: 300;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .sidebar,
.app-shell.is-sidebar-collapsed .sidebar:hover {
    width: var(--sidebar-expanded-width);
    box-shadow: 12px 0 30px rgba(0, 42, 52, 0.18);
}

.sidebar--office {
    display: flex;
    flex-direction: column;
    padding: 18px 10px 12px;
    color: rgba(255, 255, 255, 0.9);
    background: #087f8c;
}

.sidebar--office svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 8px;
    color: #d9fbff;
    background: transparent;
    cursor: pointer;
}

.sidebar-menu-button:hover,
.office-nav a:hover,
.office-nav a.is-active,
.office-org-link:hover,
.office-org-link.is-active {
    background: rgba(0, 76, 86, 0.32);
}

.office-brand {
    display: grid;
    justify-items: center;
    gap: 10px;
    margin: 20px 0 22px;
    color: #ffffff;
}

.office-brand__mark svg {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 42, 52, 0.18);
}

.office-brand__text {
    display: flex;
    align-items: baseline;
    gap: 5px;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
}

.office-brand__text strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 19px;
    letter-spacing: 0;
}

.office-brand__text em {
    font-size: 15px;
    font-style: normal;
    font-weight: 300;
}

.office-nav {
    display: grid;
    gap: 4px;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
}

.office-nav a,
.office-org-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 39px;
    border-radius: 8px;
    padding: 0 12px;
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.office-nav a span,
.office-org-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.office-nav a svg,
.office-org-link svg {
    flex: 0 0 auto;
    color: #c8f6fb;
}

.office-nav a.is-active,
.office-org-link.is-active {
    color: #ffffff;
}

.office-new-badge {
    margin-left: auto;
    border-radius: 999px;
    padding: 2px 7px;
    color: #ffffff;
    background: #e23b3b;
    box-shadow: 0 4px 10px rgba(0, 42, 52, 0.16);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.04em;
}

.office-org-link {
    margin-top: auto;
    border: 1px solid rgba(217, 251, 255, 0.62);
}

.app-shell.is-sidebar-collapsed .sidebar--office {
    align-items: center;
    padding-inline: 8px;
}

.app-shell.is-sidebar-collapsed .office-brand {
    margin: 16px 0 18px;
}

.app-shell.is-sidebar-collapsed .office-brand__text,
.app-shell.is-sidebar-collapsed .office-nav span,
.app-shell.is-sidebar-collapsed .office-org-link span {
    display: none;
}

.app-shell.is-sidebar-collapsed .office-brand__mark svg {
    width: 36px;
    height: 36px;
}

.app-shell.is-sidebar-collapsed .office-nav a,
.app-shell.is-sidebar-collapsed .office-org-link {
    justify-content: center;
    width: 46px;
    padding: 0;
}

.app-shell.is-sidebar-collapsed .office-new-badge {
    position: absolute;
    top: 8px;
    right: 7px;
    width: 8px;
    height: 8px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    color: transparent;
    font-size: 0;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .sidebar--office,
.app-shell.is-sidebar-collapsed .sidebar--office:hover {
    align-items: stretch;
    padding-inline: 10px;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-brand,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-brand {
    margin: 20px 0 22px;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-brand__text,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-brand__text {
    display: flex;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-nav span,
.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-org-link span,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-nav span,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-org-link span {
    display: inline;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-brand__mark svg,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-brand__mark svg {
    width: 46px;
    height: 46px;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-nav a,
.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-org-link,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-nav a,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-org-link {
    justify-content: flex-start;
    width: auto;
    padding: 0 12px;
}

.app-shell.is-sidebar-collapsed.is-sidebar-hover-expanded .office-new-badge,
.app-shell.is-sidebar-collapsed .sidebar:hover .office-new-badge {
    position: static;
    width: auto;
    height: auto;
    margin-left: auto;
    padding: 2px 7px;
    overflow: visible;
    color: #ffffff;
    font-size: 10px;
}

.workspace {
    min-width: 0;
    padding: 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 64px;
    margin-bottom: 20px;
}

.topbar h1 {
    font-size: 24px;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

/* 상단바 성명 클릭 시 열리는 사용자 메뉴 (partials/topbar_user.php) */
.user-menu {
    position: relative;
}

.user-menu__trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.user-menu__trigger:hover,
.user-menu__trigger[aria-expanded="true"] {
    border-color: var(--line);
    background: var(--surface-soft);
}

.user-menu__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.user-menu__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    min-width: 160px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.user-menu__panel[hidden] {
    display: none;
}

.user-menu__item {
    display: block;
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.user-menu__item:hover,
.user-menu__item:focus {
    background: var(--surface-soft);
    color: var(--brand);
}

.icon-button {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.icon-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--brand);
}

.flash-stack {
    max-width: 760px;
}

.dashboard {
    display: grid;
    gap: 22px;
}

.hero-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 28px;
    border: 1px solid rgba(220, 228, 234, 0.92);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 249, 0.92)),
        linear-gradient(90deg, rgba(39, 138, 120, 0.16), transparent);
}

.hero-band h2 {
    font-size: 28px;
    line-height: 1.3;
}

.hero-band p:not(.eyebrow) {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

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

.metric {
    min-height: 112px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.metric span,
.metric strong {
    display: block;
}

.metric span {
    color: var(--muted);
    font-weight: 700;
}

.metric strong {
    margin-top: 18px;
    font-size: 34px;
}

.metric--blue {
    border-top: 4px solid var(--blue);
}

.metric--green {
    border-top: 4px solid var(--green);
}

.metric--red {
    border-top: 4px solid var(--red);
}

.metric--amber {
    border-top: 4px solid var(--amber);
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: #ffffff;
}

.panel--wide {
    border-color: transparent;
    padding: 0;
    background: transparent;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.panel-heading h2 {
    font-size: 24px;
}

.panel-heading h3 {
    font-size: 20px;
}

.form-hint {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ── 내정보 화면 (Auth/Views/profile.php) ───────────────────────────────── */

.account-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding: 22px 24px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.account-hero__identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.account-avatar {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.account-hero__name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 4px;
    font-size: 22px;
}

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

.account-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-chips li {
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    font-size: 12px;
    font-weight: 700;
}

.account-badge {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.account-badge--green {
    background: rgba(47, 143, 91, 0.12);
    color: var(--green);
}

.account-badge--amber {
    background: rgba(215, 139, 45, 0.14);
    color: var(--amber);
}

.account-badge--red {
    background: rgba(196, 73, 73, 0.12);
    color: var(--red);
}

/* 왼쪽 정보 / 오른쪽 비밀번호 변경 2단 배치 */
.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.account-column {
    display: grid;
    gap: 18px;
    min-width: 0;
}

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

/* 이력처럼 항목이 적은 목록은 한 줄에 하나씩 */
.account-fields--single {
    grid-template-columns: minmax(0, 1fr);
}

.account-fields > div {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface-soft);
}

.account-fields dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.account-fields dd {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.account-fields dd.is-empty {
    color: var(--muted);
    font-weight: 400;
}

/* 비밀번호 입력칸 오른쪽의 표시/숨김 버튼 */
.field__control {
    position: relative;
    display: block;
}

.field__control input {
    padding-right: 46px;
}

.field__reveal {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.field__reveal:hover {
    background: var(--surface-soft);
    color: var(--brand);
}

.field__reveal svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 눈 아이콘의 사선(가림 표시)은 비밀번호가 보이는 상태에서만 나타낸다 */
.field__reveal .field__reveal-slash {
    display: none;
}

.field__reveal[data-visible="1"] .field__reveal-slash {
    display: block;
}

/* 입력 중 실시간으로 충족 여부를 표시하는 비밀번호 규칙 목록 */
.account-rules {
    display: grid;
    gap: 6px;
    margin: 2px 0 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--surface-soft);
    list-style: none;
}

.account-rules li {
    display: grid;
    grid-template-columns: 16px 1fr;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.account-rules li::before {
    content: "";
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--line);
    border-radius: 50%;
    background: #ffffff;
}

.account-rules li[data-met="1"] {
    color: var(--green);
    font-weight: 700;
}

/* 충족된 항목은 초록 원 + 체크 표시로 바꾼다 */
.account-rules li[data-met="1"]::before {
    border-color: var(--green);
    background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}

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

@media (max-width: 640px) {
    .account-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .account-hero {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

.module-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 168px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
}

.module-card h4 {
    margin: 0;
    font-size: 18px;
}

.module-card p {
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.58;
}

.module-card span {
    align-self: flex-start;
    margin-top: 18px;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 800;
    background: #eef6f4;
}

.fee-summary-panel .metric-grid {
    margin-top: 16px;
}

.fee-summary-panel .metric strong {
    font-size: 28px;
}

.profile-list {
    display: grid;
    gap: 12px;
    margin: 0 0 20px;
}

.profile-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.profile-list dt {
    color: var(--muted);
    font-weight: 700;
}

.profile-list dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.table-search {
    max-width: 260px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 14px 12px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.approval-actions {
    display: grid;
    gap: 12px;
}

.approval-actions form {
    display: grid;
    gap: 8px;
}

.inline-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 8px;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 28px;
    background: var(--surface-soft);
}

.empty-state strong,
.empty-state p {
    display: block;
    margin: 0;
}

.empty-state p {
    margin-top: 8px;
    color: var(--muted);
}

.approval-list {
    display: grid;
    gap: 16px;
}

.approval-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr);
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: #ffffff;
}

.approval-card__profile {
    border-right: 1px solid var(--line);
    padding-right: 18px;
}

.approval-card h4 {
    margin: 12px 0 16px;
    font-size: 22px;
}

.approval-card dl {
    display: grid;
    gap: 10px;
    margin: 0;
}

.approval-card dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #edf2f5;
    padding-bottom: 10px;
}

.approval-card dt {
    color: var(--muted);
    font-weight: 800;
}

.approval-card dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.approval-card__actions {
    display: grid;
    gap: 14px;
}

.approval-card__actions form {
    display: grid;
    gap: 14px;
}

.reject-form {
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    color: var(--brand);
    font-size: 12px;
    font-weight: 900;
    background: #eef6f4;
}

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .auth-visual {
        min-height: 360px;
    }

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

    .sidebar {
        position: fixed;
        z-index: 300;
        left: 0;
        transform: translateX(-100%);
        width: 240px;
        transition: transform 0.2s ease;
    }

    .app-shell.is-sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .app-shell.is-sidebar-open .sidebar {
        transform: translateX(0);
    }

    .app-shell.is-sidebar-collapsed .sidebar--office {
        align-items: stretch;
        padding-inline: 12px;
    }

    .app-shell.is-sidebar-collapsed .office-brand__text,
    .app-shell.is-sidebar-collapsed .office-nav span,
    .app-shell.is-sidebar-collapsed .office-org-link span {
        display: inline;
    }

    .app-shell.is-sidebar-collapsed .office-brand__mark svg {
        width: 46px;
        height: 46px;
    }

    .app-shell.is-sidebar-collapsed .office-nav a,
    .app-shell.is-sidebar-collapsed .office-org-link {
        justify-content: flex-start;
        width: auto;
        padding: 0 12px;
    }

    .icon-button {
        display: inline-block;
    }

    .content-grid,
    .metric-grid,
    .approval-card {
        grid-template-columns: 1fr;
    }

    .approval-card__profile {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding-right: 0;
        padding-bottom: 18px;
    }
}

@media (max-width: 720px) {
    .auth-body {
        padding: 14px;
        background-attachment: scroll;
    }

    .auth-shell {
        min-height: auto;
        border-radius: 12px;
    }

    .auth-visual {
        padding: 24px;
    }

    .auth-visual h1 {
        font-size: 32px;
    }

    .system-preview,
    .field-grid,
    .auth-actions,
    .auth-metrics,
    .module-grid,
    .inline-fields {
        grid-template-columns: 1fr;
    }

    .workspace {
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
    }

    .topbar__user,
    .hero-band {
        align-items: stretch;
        flex-direction: column;
    }
}
