/* ── PDA 디자인 시스템 ── */
:root {
    --pda-bg: #F5F5F5;
    --pda-surface: #FFFFFF;
    --pda-border: #DEDEDE;
    --pda-text: #333333;
    --pda-sub: #666666;
    --pda-muted: #999999;
    --pda-header: #1C2D4F;
    --pda-header-sub: #7EAADF;
    --pda-purchase: #1A7A4A;
    --pda-shipment: #1A4A7A;
    --pda-material: #7B2D8E;
    --pda-stock: #7A4A1A;
    --pda-success: #1A7A4A;
    --pda-warning: #D97706;
    --pda-error: #DC2626;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--pda-bg);
    font-family: "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, "Malgun Gothic", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

/* ── 메인 대시보드 ── */
.pda-root {
    min-height: 100dvh;
    background: var(--pda-bg);
    display: flex;
    flex-direction: column;
}

.pda-header {
    background: var(--pda-header);
    padding: 48px 20px 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-shrink: 0;
}

.header-left { display: flex; flex-direction: column; gap: 3px; }

.app-title {
    font-size: 22px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
    line-height: 1;
}

.app-date {
    font-size: 12px;
    color: var(--pda-header-sub);
    font-weight: 400;
}

.header-company {
    font-size: 12px;
    color: var(--pda-header-sub);
}

.card-area {
    padding: 20px 16px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* ── 기능 카드 ── */
.feature-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 18px;
    border-radius: 12px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: filter 0.12s ease, transform 0.12s ease;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.feature-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.09) 0%, transparent 55%);
    pointer-events: none;
}

.feature-card:active {
    filter: brightness(0.86);
    transform: scale(0.98);
}

.card-purchase { background: var(--pda-purchase); }
.card-shipment { background: var(--pda-shipment); }
.card-material { background: var(--pda-material); }

.card-icon { font-size: 34px; flex-shrink: 0; line-height: 1; }

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
    line-height: 1;
}

.card-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.4;
}

.card-arrow {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 300;
    flex-shrink: 0;
    line-height: 1;
}

/* ── 서브페이지 공통 헤더 ── */
.page-header {
    padding: 48px 16px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.page-header.purchase  { background: var(--pda-purchase); }
.page-header.shipment  { background: var(--pda-shipment); }
.page-header.material  { background: var(--pda-material); }

.btn-back {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 1;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.01em;
}

/* ── 카드/서피스 ── */
.surface {
    background: var(--pda-surface);
    border-radius: 10px;
    border: 1px solid var(--pda-border);
    padding: 14px;
}

/* ── 기타 유틸리티 ── */
.text-muted { color: var(--pda-muted); font-size: 12px; }
.text-sub   { color: var(--pda-sub); font-size: 13px; }
.text-bold  { font-weight: 700; }
.monospace  { font-family: "JetBrains Mono", "Consolas", monospace; }

/* ── Blazor 오류 UI ── */
#blazor-error-ui {
    background: var(--pda-error);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: white;
    font-size: 14px;
}

#blazor-error-ui .dismiss { cursor: pointer; font-weight: 700; }

.valid.modified:not([type=checkbox]) { outline: 1px solid var(--pda-success); }
.invalid { outline: 1px solid var(--pda-error); }
.validation-message { color: var(--pda-error); font-size: 12px; }
