:root {
    color-scheme: light;
    --background: #f7f7f5;
    --surface: #ffffff;
    --sidebar: #f1f1ef;
    --text: #20201e;
    --muted: #73736f;
    --subtle: #9b9b96;
    --border: #deded9;
    --border-strong: #cecec8;
    --accent: #306b5b;
    --accent-soft: #e3eee9;
    --danger: #b5453b;
    --shadow: 0 1px 2px rgba(25, 25, 23, 0.04), 0 8px 24px rgba(25, 25, 23, 0.05);
    --sidebar-width: 240px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--background);
    color: var(--text);
    font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    padding: 20px 14px 16px;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
}

.brand {
    display: flex;
    height: 38px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 680;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 7px;
    background: var(--text);
    color: white;
    font-size: 11px;
    font-weight: 800;
}

.nav-label {
    margin: 28px 10px 8px;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.nav-list {
    display: grid;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.nav-link {
    display: flex;
    min-height: 36px;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
    border-radius: 7px;
    color: #5f5f5b;
    font-size: 13px;
    font-weight: 520;
    text-decoration: none;
    transition: background 140ms ease, color 140ms ease;
}

.nav-link svg {
    width: 16px;
    height: 16px;
    color: #85857f;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.045);
    color: var(--text);
}

.nav-link.active {
    background: var(--surface);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: var(--text);
    font-weight: 620;
}

.nav-link.active svg {
    color: var(--accent);
}

.sidebar-footer {
    margin-top: auto;
    padding: 14px 10px 2px;
    border-top: 1px solid var(--border);
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.6;
}

.main-column {
    grid-column: 2;
    min-width: 0;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(247, 247, 245, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.page-name {
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    letter-spacing: -0.015em;
}

.auth-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.button {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
    transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.button:hover {
    border-color: #b8b8b2;
    background: #fafaf9;
}

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

.button.primary {
    border-color: var(--text);
    background: var(--text);
    color: white;
}

.button.primary:hover {
    background: #353532;
}

.content {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: 52px 42px 80px;
}

.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 38px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.045em;
}

.page-description {
    max-width: 430px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.65;
    word-break: keep-all;
}

.summary {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
}

.summary-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

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

.section-heading h2 {
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.section-meta {
    color: var(--subtle);
    font-size: 11px;
}

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

.service-card {
    position: relative;
    display: flex;
    min-height: 204px;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.service-card:hover {
    border-color: #bdbdb7;
    box-shadow: 0 2px 4px rgba(25, 25, 23, 0.05), 0 14px 34px rgba(25, 25, 23, 0.09);
    transform: translateY(-2px);
}

.service-card:focus-visible,
.button:focus-visible,
.nav-link:focus-visible,
.icon-button:focus-visible {
    outline: 3px solid rgba(48, 107, 91, 0.28);
    outline-offset: 2px;
}

.service-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.service-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--background);
}

.service-icon svg {
    width: 21px;
    height: 21px;
}

.service-arrow {
    color: #aaa9a4;
    transition: color 160ms ease, transform 160ms ease;
}

.service-arrow svg {
    width: 16px;
    height: 16px;
}

.service-card:hover .service-arrow {
    color: var(--accent);
    transform: translate(2px, -2px);
}

.service-copy {
    margin-top: auto;
}

.service-copy h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.service-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
    word-break: keep-all;
}

.details-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.65fr);
    gap: 14px;
    margin-top: 38px;
}

.info-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
}

.info-panel h2 {
    margin: 0 0 18px;
    font-size: 13px;
    font-weight: 650;
}

.info-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    padding: 13px 0;
    border-top: 1px solid #ecece8;
    font-size: 12px;
}

.info-key {
    color: var(--muted);
}

.info-value {
    font-weight: 550;
}

.quick-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.quick-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.quick-list svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--accent);
}

dialog {
    width: min(calc(100% - 32px), 410px);
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.22);
}

dialog::backdrop {
    background: rgba(24, 24, 22, 0.46);
    backdrop-filter: blur(2px);
}

.dialog-inner {
    padding: 26px;
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.dialog-head h2 {
    margin: 0;
    font-size: 18px;
    letter-spacing: -0.03em;
}

.dialog-head p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.icon-button {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--background);
    color: var(--text);
}

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

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

.field label {
    font-size: 12px;
    font-weight: 600;
}

.field input {
    width: 100%;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--border-strong);
    border-radius: 7px;
    background: white;
    color: var(--text);
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(48, 107, 91, 0.12);
}

.auth-submit {
    width: 100%;
    margin-top: 4px;
}

.form-note {
    margin: 0;
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.5;
    text-align: center;
}

.mobile-brand {
    display: none;
}

@media (max-width: 860px) {
    :root {
        --sidebar-width: 76px;
    }

    .sidebar {
        align-items: center;
        padding-right: 10px;
        padding-left: 10px;
    }

    .brand {
        padding: 0;
    }

    .brand > span:last-child,
    .nav-label,
    .nav-link span,
    .sidebar-footer {
        display: none;
    }

    .nav-list {
        margin-top: 26px;
    }

    .nav-link {
        width: 40px;
        justify-content: center;
        padding: 0;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main-column {
        width: 100%;
    }

    .topbar {
        padding: 0 18px;
    }

    .mobile-brand {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-weight: 680;
    }

    .mobile-brand .brand-mark {
        width: 22px;
        height: 22px;
    }

    .page-name {
        display: none;
    }

    .content {
        padding: 40px 18px 64px;
    }

    .page-header {
        display: block;
        margin-bottom: 32px;
    }

    .summary {
        display: inline-flex;
        margin-top: 20px;
    }

    .services {
        grid-template-columns: 1fr;
    }

    .service-card {
        min-height: 170px;
    }
}

@media (max-width: 420px) {
    .auth-actions {
        gap: 6px;
    }

    .auth-actions .button {
        min-height: 32px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .info-row {
        grid-template-columns: 90px 1fr;
    }

    .dialog-inner {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}
