/* Desk Automation - Global Styles */
:root {
    --bg: #f0edf5;
    --card: #ffffff;
    --text: #2d2640;
    --text-muted: #8a7fa0;
    --border: #e8e0f0;
    --accent: #6c5ce7;
    --accent-light: #a29bfe;
    --success: #00b894;
    --warning: #fdcb6e;
    --danger: #d63031;
    --info: #74b9ff;

    /* Pastel palette for cards */
    --pastel-lavender: linear-gradient(135deg, #e8e0f4 0%, #f0e8fa 50%, #ece4f6 100%);
    --pastel-mint: linear-gradient(135deg, #ddf0e8 0%, #e4f4ee 50%, #dff2eb 100%);
    --pastel-peach: linear-gradient(135deg, #f4e4de 0%, #f8ece6 50%, #f6e8e2 100%);
    --pastel-sky: linear-gradient(135deg, #dce8f4 0%, #e4eef8 50%, #e0ecf6 100%);
    --pastel-rose: linear-gradient(135deg, #f2dce8 0%, #f6e4ee 50%, #f4e0ec 100%);
    --pastel-lemon: linear-gradient(135deg, #f0ecd8 0%, #f4f0e0 50%, #f2eedc 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Gulim', '굴림', 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text);
  background:
    radial-gradient(circle at 15% 18%, rgba(211,231,226,0.95) 0%, rgba(211,231,226,0.35) 18%, rgba(211,231,226,0) 38%),
    radial-gradient(circle at 73% 20%, rgba(166,105,222,0.85) 0%, rgba(166,105,222,0.35) 18%, rgba(166,105,222,0) 36%),
    radial-gradient(circle at 58% 52%, rgba(248,176,173,0.72) 0%, rgba(248,176,173,0.30) 26%, rgba(248,176,173,0) 50%),
    linear-gradient(135deg, #e7e5d7 0%, #f0d0ba 38%, #e6b9b5 63%, #b06ed6 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ── Nav ── */
.nav-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 8px; border: none;
    background: transparent; color: var(--text-muted);
    font-size: 13px; font-weight: 600; cursor: pointer;
    transition: all 0.2s;
}
.nav-tab:hover { background: rgba(108,92,231,0.08); color: var(--text); }
.nav-tab-active {
    background: linear-gradient(135deg, #d8d0f0, #e0d8f4);
    color: var(--accent);
    box-shadow: 0 2px 8px rgba(108,92,231,0.15);
}
.nav-tab-active:hover {
    background: linear-gradient(135deg, #d0c8ec, #d8d0f0);
    color: var(--accent);
}
/* nav dropdown — yaml tabs.children 으로 그룹화한 메뉴 (예: 부가기능 ▼) */
.nav-dropdown-panel {
    position: absolute; top: calc(100% + 6px); left: 0;
    background: #fff; border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 8px 24px rgba(45,38,64,0.15);
    min-width: 160px; padding: 6px 0; z-index: 90;
}
.nav-dropdown-item {
    display: block; padding: 9px 16px; font-size: 13px; font-weight: 500;
    color: var(--text); text-decoration: none; transition: background 0.15s;
}
.nav-dropdown-item:hover {
    background: rgba(108,92,231,0.08); color: var(--accent);
}

/* ── Cards (pastel gradient + glass border + deep shadow) ── */
.card {
    position: relative;
    background: var(--pastel-lavender);
    border-radius: 8px;
    padding: 24px;
    border: none;
    box-shadow:
        0 8px 32px rgba(45,38,64,0.12),
        0 4px 16px rgba(45,38,64,0.08),
        0 2px 6px rgba(45,38,64,0.05);
}
.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
    border-top: 2px solid rgba(255,255,255,0.8);
    border-left: 2px solid rgba(255,255,255,0.7);
    border-right: 2px solid rgba(255,255,255,0.05);
    border-bottom: 2px solid rgba(255,255,255,0.02);
    mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(135deg, rgba(0,0,0,1) 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0) 100%);
}
.card > * { position: relative; z-index: 2; }

/* Card color variants via nth-child auto-rotation */
.card:nth-child(4n+1) { background: var(--pastel-lavender); }
.card:nth-child(4n+2) { background: var(--pastel-mint); }
.card:nth-child(4n+3) { background: var(--pastel-peach); }
.card:nth-child(4n+4) { background: var(--pastel-sky); }

/* Named card variants for explicit use */
.card-lavender { background: var(--pastel-lavender) !important; }
.card-mint { background: var(--pastel-mint) !important; }
.card-peach { background: var(--pastel-peach) !important; }
.card-sky { background: var(--pastel-sky) !important; }
.card-rose { background: var(--pastel-rose) !important; }
.card-lemon { background: var(--pastel-lemon) !important; }

/* ── Buttons ── */
.btn {
    padding: 10px 20px; border-radius: 10px; border: none;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #5a4bd6; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,92,231,0.3); }
.btn-secondary { background: rgba(255,255,255,0.7); color: var(--text); border: 1px solid rgba(255,255,255,0.8); }
.btn-secondary:hover { background: rgba(255,255,255,0.9); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 8px; }

/* ── Forms ── */
.input {
    width: 100%; padding: 10px 14px; border-radius: 10px;
    border: 1px solid rgba(200,190,220,0.4); font-size: 14px;
    background: rgba(255,255,255,0.6); transition: all 0.2s;
    backdrop-filter: blur(4px);
}
.input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.85); }
textarea.input { resize: vertical; min-height: 80px; font-family: 'Consolas', monospace; }

/* ── Tables ── */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 8px 12px; text-align: left; border-bottom: 1px solid rgba(200,190,220,0.25); font-size: 13px; }
.table th { font-weight: 700; color: var(--text); font-size: 14px; text-transform: none; background: rgba(108,92,231,0.06); }
.table tr:hover { background: rgba(255,255,255,0.4); }

/* ── Animations ── */
@keyframes monitorBlink { 0%,100% { opacity:1; } 50% { opacity:0.6; } }

/* ── Status badges ── */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
}
.badge-success { background: rgba(0,184,148,0.15); color: #00b894; }
.badge-warning { background: rgba(253,203,110,0.25); color: #e17055; }
.badge-danger { background: rgba(214,48,49,0.12); color: #d63031; }
.badge-info { background: rgba(116,185,255,0.15); color: #636e72; }
.badge-active { background: rgba(108,92,231,0.12); color: #6c5ce7; }

/* ── Agent status indicator ── */
.agent-dot {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block; margin-right: 6px;
}
.agent-dot-connected { background: var(--success); box-shadow: 0 0 6px rgba(0,184,148,0.4); }
.agent-dot-disconnected { background: #b2bec3; }

/* ── Panels ── */
.panel { display: none; }
.panel-active { display: block; }

/* ===== Tablet style login view ===== */
.tablet-login-view {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px; box-sizing: border-box; overflow: hidden;
  background: transparent; position: relative;
}
.tablet-login-stage { width: 100%; display: flex; justify-content: center; align-items: center; }
.tablet-device {
  width: 1040px; max-width: calc(100vw - 56px); aspect-ratio: 1.96 / 1;
  background: linear-gradient(180deg, #1f1b1a 0%, #322b29 55%, #120f0f 100%);
  border-radius: 14px; padding: 8px; position: relative;
  box-shadow: 0 40px 80px rgba(80,38,46,0.45), 0 20px 40px rgba(0,0,0,0.35), 0 80px 120px rgba(40,20,30,0.3);
}
.tablet-device::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; z-index: 3;
  border-left: 2px solid transparent; border-top: 2px solid transparent;
  border-right: 1px solid rgba(255,255,255,0.03); border-bottom: 1px solid rgba(255,255,255,0.02);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 40%, rgba(0,0,0,0) 70%) border-box,
    linear-gradient(to left, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0.06) 35%, rgba(0,0,0,0) 60%) border-box,
    linear-gradient(180deg, transparent, transparent) padding-box;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 2px;
}
.tablet-camera {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 10px; border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #111 0%, #232323 100%); z-index: 5;
}
.tablet-camera::after {
  content: ""; position: absolute; top: 3px; left: 50%; width: 8px; height: 4px;
  transform: translateX(-50%); border-radius: 999px; background: rgba(120,130,150,0.45);
}
.tablet-screen {
  width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 14%, rgba(255,255,255,0.07) 0, rgba(255,255,255,0) 28%),
    linear-gradient(135deg, #f1dfcc 0%, #efbba7 35%, #eea8b5 63%, #d48fe3 100%);
  border-radius: 10px; overflow: hidden;
  display: grid; grid-template-columns: 0.255fr 0.745fr; position: relative;
}
/* Sidebar */
.tablet-sidebar {
  background: linear-gradient(180deg, rgba(255,248,245,0.90) 0%, rgba(247,239,237,0.92) 100%);
  padding: 18px 20px; display: flex; flex-direction: column;
}
.sidebar-avatar-row { display: flex; justify-content: flex-end; margin-bottom: 14px; }
.sidebar-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #f3d4ae 0 24%, transparent 25%),
    radial-gradient(circle at 50% 66%, #3b2a21 0 28%, transparent 29%),
    radial-gradient(circle at 50% 50%, #5a4031 0 48%, #2d211c 49% 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}
.sidebar-search {
  height: 34px; border-radius: 18px; background: rgba(255,255,255,0.58);
  display: flex; align-items: center; padding: 0 12px; color: #c3b5b4; font-size: 11px; gap: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.search-icon {
  width: 10px; height: 10px; border: 1.5px solid #d4c7c6; border-radius: 50%;
  position: relative; box-sizing: border-box;
}
.search-icon::after {
  content: ""; position: absolute; width: 5px; height: 1.5px; background: #d4c7c6;
  right: -4px; bottom: -1px; transform: rotate(45deg); border-radius: 2px;
}
.sidebar-stats { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.stat-card { padding: 10px 0; border-bottom: 1px solid rgba(125,103,108,0.12); }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 10px; color: #a99d9e; margin-bottom: 6px; text-transform: lowercase; }
.stat-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.stat-dot.green { background: #a5d5a7; }
.stat-dot.gray { background: #c7c2c2; }
.stat-value { font-size: 16px; font-weight: 700; color: #2f2123; letter-spacing: -0.02em; }
.stat-value.negative { color: #3e2b30; }
.sidebar-system-desc { margin-top: 10px; text-align: center; flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.sidebar-system-desc p { font-size: 10px; line-height: 1.6; color: #6a5a5e; margin: 0 0 8px; word-break: keep-all; font-family: 'Inter', sans-serif; font-weight: 400; }
.sidebar-system-desc .desc-en { color: #a99d9e; font-style: italic; }
.sidebar-copyright { margin-top: auto; padding-top: 10px; text-align: center; }
.copyright-links { margin-bottom: 6px; font-size: 9px; }
.copyright-links a { color: #6c5ce7; text-decoration: none; }
.copyright-links a:hover { text-decoration: underline; }
.copyright-links span { color: #ccc; margin: 0 4px; }
.copyright-name { font-size: 10px; font-weight: 700; color: #6e5a5e; letter-spacing: 0.02em; }
.copyright-contact { font-size: 9px; color: #a99d9e; margin-top: 3px; }
.copyright-legal { font-size: 8px; color: #b8adb0; margin-top: 6px; }
.quick-menu-title { margin-top: 18px; margin-bottom: 12px; font-size: 10px; color: #b0a4a4; }
.quick-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.quick-menu-item {
  border: none; background: rgba(255,255,255,0.52); border-radius: 13px; aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.48), 0 6px 14px rgba(201,174,177,0.18);
}
.qm-icon { width: 16px; height: 16px; position: relative; opacity: 0.75; }
.qm-icon.user::before, .qm-icon.person::before, .qm-icon.briefcase::before,
.qm-icon.star::before, .qm-icon.list::before, .qm-icon.lock::before {
  content: ""; position: absolute; inset: 0; background: #b19ea4;
}
.qm-icon.user::before { clip-path: path("M8 1.5A3 3 0 1 1 8 7.5A3 3 0 0 1 8 1.5M2 14C2 11.5 4.7 10 8 10C11.3 10 14 11.5 14 14Z"); }
.qm-icon.person::before { clip-path: path("M8 1A3 3 0 1 1 8 7A3 3 0 0 1 8 1M6 8H10V15H6Z"); }
.qm-icon.briefcase::before { clip-path: path("M3 5H13A1 1 0 0 1 14 6V13A1 1 0 0 1 13 14H3A1 1 0 0 1 2 13V6A1 1 0 0 1 3 5M5 3H11V5H5Z"); }
.qm-icon.star::before { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 92%, 50% 70%, 21% 92%, 32% 57%, 2% 35%, 39% 35%); }
.qm-icon.list::before { clip-path: path("M2 3H14V5H2ZM2 7H14V9H2ZM2 11H14V13H2Z"); }
.qm-icon.lock::before { clip-path: path("M5 7V5.8A3 3 0 0 1 11 5.8V7H12A1 1 0 0 1 13 8V13A1 1 0 0 1 12 14H4A1 1 0 0 1 3 13V8A1 1 0 0 1 4 7ZM6.5 7H9.5V5.8A1.5 1.5 0 0 0 6.5 5.8Z"); }
/* Main panel */
.tablet-main { position: relative; padding: 34px 34px 22px 34px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; }
.main-header { display: flex; justify-content: center; align-items: flex-start; text-align: center; }
.brand-copy h1 { margin: 0; color: #fff7ef; font-size: 38px; line-height: 1; letter-spacing: 0.02em; font-weight: 800; font-family: 'Arial Nova', 'Arial', sans-serif; }
.brand-copy p { width: auto; max-width: 520px; margin: 10px auto 0; color: rgba(255,250,244,0.82); font-size: 12px; line-height: 1.4; font-weight: 500; letter-spacing: 0.01em; text-align: center; white-space: nowrap; }
/* Feature cards */
.feature-carousel { margin-top: 28px; display: flex; align-items: center; justify-content: center; gap: 16px; }
.feature-carousel.hidden, .main-header.hidden { display: none; }
.feature-card {
  width: 138px; height: 170px; border-radius: 24px; padding: 16px 14px 14px;
  box-sizing: border-box; position: relative; color: #fff;
  box-shadow: 0 24px 48px rgba(40,10,30,0.40), 0 12px 20px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,255,255,0.25);
}
.feature-card:nth-child(2) { width: 155px; height: 191px; }
.feature-config { background: linear-gradient(160deg, #ffe8f0 0%, #f8b4cc 50%, #e88aad 100%); }
.feature-engine { background: linear-gradient(160deg, #ede0ff 0%, #c4a6f0 50%, #a07dd8 100%); transform: translateY(4px); }
.feature-web { background: linear-gradient(160deg, #dceeff 0%, #a8ccf0 50%, #7baed8 100%); }
.feature-icon.globe {
  width: 22px; height: 22px; border: 1.8px solid rgba(255,255,255,0.95);
  border-radius: 50%; position: relative; margin: 0 auto 18px; box-sizing: border-box;
}
.feature-icon.globe::before, .feature-icon.globe::after { content: ""; position: absolute; background: rgba(255,255,255,0.95); }
.feature-icon.globe::before { width: 1.4px; height: 18px; left: 50%; top: 1px; transform: translateX(-50%); border-radius: 2px; }
.feature-icon.globe::after { width: 16px; height: 1.4px; top: 50%; left: 2px; transform: translateY(-50%); border-radius: 2px; }
.feature-title { font-size: 28px; line-height: 1; font-weight: 900; margin-top: 8px; letter-spacing: 0.02em; font-family: 'Orbitron', sans-serif; text-align: center; }
.feature-config .feature-title { color: #c45a7a; }
.feature-engine .feature-title { color: #7a4eaa; }
.feature-web .feature-title { color: #4a7eb8; }
.feature-subtitle { margin-top: 8px; font-size: 11px; line-height: 1.2; color: rgba(255,255,255,0.9); font-weight: 600; text-align: center; }
.feature-desc { margin-top: 4px; font-size: 10px; line-height: 1.35; color: rgba(255,255,255,0.82); word-break: keep-all; text-align: center; }
.feature-switch {
  position: absolute; left: 16px; bottom: 16px; width: 30px; height: 16px;
  border-radius: 999px; background: rgba(255,255,255,0.28); box-shadow: inset 0 1px 2px rgba(0,0,0,0.08);
}
.feature-switch span { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; }
.feature-next {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: rgba(255,245,238,0.78); box-shadow: 0 10px 20px rgba(106,73,78,0.14);
  display: flex; align-items: center; justify-content: center; margin-left: 4px; flex: 0 0 auto;
}
.feature-next span {
  width: 10px; height: 10px; border-top: 2px solid #a38d8d; border-right: 2px solid #a38d8d;
  transform: rotate(45deg); margin-left: -2px;
}
/* Bottom strip */
.bottom-strip { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; padding-top: 18px; }
.mini-chart {
  width: 122px; height: 62px; border-radius: 18px; background: rgba(255,255,255,0.38);
  display: flex; align-items: flex-end; gap: 7px; padding: 12px 12px 10px; box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.38);
}
.bar { width: 8px; border-radius: 999px; background: linear-gradient(180deg, rgba(164,255,206,0.9) 0%, rgba(92,214,156,0.92) 100%); }
.bar.b1 { height: 18px; } .bar.b2 { height: 30px; } .bar.b3 { height: 22px; } .bar.b4 { height: 38px; } .bar.b5 { height: 27px; }
.member-list { display: flex; align-items: flex-end; gap: 18px; padding-right: 10px; }
.member { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.member-avatar { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 6px 14px rgba(97,59,66,0.14); }
.avatar-1 { background: radial-gradient(circle at 50% 38%, #efc9a3 0 25%, transparent 26%), radial-gradient(circle at 50% 68%, #4f3428 0 30%, transparent 31%), radial-gradient(circle at 50% 50%, #7a5441 0 49%, #56382a 50% 100%); }
.avatar-2 { background: radial-gradient(circle at 50% 38%, #ecc9b3 0 25%, transparent 26%), radial-gradient(circle at 50% 68%, #513228 0 30%, transparent 31%), radial-gradient(circle at 50% 50%, #2d1d1b 0 49%, #472a28 50% 100%); }
.avatar-3 { background: radial-gradient(circle at 50% 38%, #dfbb8d 0 25%, transparent 26%), radial-gradient(circle at 50% 68%, #214638 0 30%, transparent 31%), radial-gradient(circle at 50% 50%, #21382c 0 49%, #111c15 50% 100%); }
.member-status { width: 9px; height: 9px; border-radius: 50%; background: #f4fbff; box-shadow: inset 0 0 0 2px rgba(84,219,186,0.95); }
/* Sidebar auth form */
.sidebar-auth { margin-top: 12px; flex: 1; display: flex; flex-direction: column; overflow-y: auto; min-height: 0; }
.da-logo { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.da-logo-header { width: 24px; height: 24px; }
.sidebar-auth-title { font-size: 13px; font-weight: 900; color: #1a1a2e; margin-bottom: 10px; font-family: 'Inter', sans-serif; letter-spacing: -0.02em; text-align: center; display: flex; align-items: center; justify-content: center; gap: 5px; padding-top: 14px; }
.sidebar-auth .auth-form { display: block; width: 100%; }
.sidebar-auth .auth-form input {
  width: 100%; height: 26px; padding: 0 8px 0 12px; border-radius: 5px;
  border: 1px solid rgba(180,160,170,0.2); border-left: 3px solid #5a8cf7;
  background: rgba(255,255,255,0.6); box-sizing: border-box; outline: none;
  font-size: 10px; color: #2f2123; margin-bottom: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sidebar-auth .auth-form input::placeholder { color: #b8adb0; }
.sidebar-auth .auth-form input:focus { border-color: #8b6ce0; box-shadow: 0 0 0 3px rgba(139,108,224,0.12); }
/* 가입(Sign up) 폼은 입력 항목이 많고 가독성이 필요해 로그인보다 크게 (2026-07-08) */
.sidebar-auth #register-form input { height: 34px; font-size: 13px; margin-bottom: 9px; }
.sidebar-auth #register-form .auth-buttons button { height: 34px; font-size: 13px; }

/* 가입 동의 (2026-08-11) — 체크박스는 입력칸 높이 규칙에서 빼야 한다(위 규칙이 34px 로 늘린다) */
.sidebar-auth #register-form .auth-agree {
    display: flex; align-items: flex-start; gap: 7px;
    font-size: 12px; line-height: 1.45; margin-bottom: 7px; cursor: pointer;
}
.sidebar-auth #register-form .auth-agree input[type="checkbox"] {
    height: 14px; width: 14px; margin: 2px 0 0 0; flex: 0 0 auto;
}
.sidebar-auth #register-form .auth-agree a { text-decoration: underline; }
.sidebar-auth #register-form .auth-agree-note {
    font-size: 11px; line-height: 1.45; margin: 4px 0 10px; opacity: 0.75;
}
.auth-buttons { display: flex; gap: 6px; margin-top: 8px; }
.auth-buttons-stack { flex-direction: column; }
.auth-buttons button {
  flex: 1; height: 26px; border: none; border-radius: 5px; font-size: 10px; font-weight: 700; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  background: linear-gradient(135deg, #9b6ce0 0%, #7f52eb 100%); color: #fff;
  box-shadow: 0 6px 16px rgba(127,82,235,0.22);
}
.auth-buttons button:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(127,82,235,0.28); }
.auth-buttons button.secondary {
  background: rgba(255,255,255,0.7); color: #7f52eb; border: 1px solid rgba(127,82,235,0.2);
  box-shadow: 0 3px 8px rgba(80,38,46,0.06);
}
.auth-buttons button.secondary:hover { background: rgba(255,255,255,0.9); }
.auth-buttons button:active { transform: translateY(0); }
.login-error { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(220,53,69,0.08); color: var(--danger); border: 1px solid rgba(220,53,69,0.18); font-size: 12px; line-height: 1.4; }
/* Terms panel — KRDS-inspired agreement UI */
.terms-panel { display: flex; flex-direction: column; width: 86%; height: 82%; padding: 0; box-sizing: border-box; position: absolute; top: 3%; left: 7%; overflow-y: auto; gap: 10px; }
.terms-panel.hidden { display: none; }
.terms-step { flex-shrink: 0; padding: 12px 0 8px; }
.terms-step-badge { display: inline-block; font-size: 12px; font-weight: 800; color: #1a1a2e; font-family: 'Inter', sans-serif; }
.terms-step-desc { font-size: 10px; color: #888; margin-left: 8px; }
.terms-card { flex: 1; display: flex; flex-direction: column; background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; min-height: 160px; }
.terms-card-header { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid #e5e7eb; background: #fafafa; flex-shrink: 0; }
.terms-card-num { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #6c5ce7; color: #fff; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.terms-card-title { font-size: 12px; font-weight: 700; color: #1a1a2e; flex: 1; }
.terms-hint-badge { font-size: 9px; color: #d97706; background: #fef3c7; padding: 2px 8px; border-radius: 10px; font-weight: 600; transition: opacity 0.3s; flex-shrink: 0; }
.terms-hint-badge.hidden { opacity: 0; pointer-events: none; }
.terms-card-body { flex: 1; overflow-y: auto; padding: 12px 16px; font-size: 10.5px; line-height: 1.7; color: #444; font-family: 'Segoe UI', 'Apple SD Gothic Neo', sans-serif; min-height: 0; }
.terms-card-body h1 { font-size: 11px; text-align: center; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; margin-bottom: 8px; color: #1a1a2e; font-weight: 700; }
.terms-card-body h2 { font-size: 10.5px; margin: 12px 0 4px; color: #6c5ce7; border-left: 2.5px solid #6c5ce7; padding-left: 7px; font-weight: 700; }
.terms-card-body h3 { font-size: 10px; margin: 8px 0 3px; color: #444; font-weight: 700; }
.terms-card-body p { margin: 3px 0; }
.terms-card-body ol, .terms-card-body ul { padding-left: 16px; margin: 3px 0; }
.terms-card-body li { margin-bottom: 1px; }
.terms-card-body .highlight { background: #fffbeb; border-left: 2px solid #d97706; padding: 4px 8px; margin: 5px 0; border-radius: 3px; font-size: 9.5px; }
.terms-card-body .important { background: #fef2f2; border-left: 2px solid #dc2626; padding: 4px 8px; margin: 5px 0; border-radius: 3px; font-size: 9.5px; }
.terms-card-body .info { background: #eff6ff; border-left: 2px solid #2563eb; padding: 4px 8px; margin: 5px 0; border-radius: 3px; font-size: 9.5px; }
.terms-card-body strong { color: #1a1a2e; }
.terms-card-body table { font-size: 9.5px; }
.terms-card-body th, .terms-card-body td { padding: 3px 6px; }
.terms-card-body .version { font-size: 9.5px; color: #999; text-align: center; margin-bottom: 8px; }
.terms-card-body::-webkit-scrollbar { width: 5px; }
.terms-card-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }
.terms-card-body::-webkit-scrollbar-thumb:hover { background: #bbb; }
/* Agree bar at bottom of terms card */
.terms-card-agree { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid #e5e7eb; background: #fafafa; flex-shrink: 0; }
.terms-agree-text { font-size: 10.5px; color: #333; font-weight: 500; }
.terms-radio-group { display: flex; gap: 12px; }
.terms-radio { display: flex; align-items: center; gap: 4px; font-size: 10.5px; color: #555; cursor: pointer; user-select: none; }
.terms-radio input[type="radio"] { width: 14px; height: 14px; accent-color: #6c5ce7; cursor: pointer; margin: 0; }
.terms-radio input[type="radio"]:disabled { cursor: not-allowed; opacity: 0.4; }
.terms-radio-yes span { font-weight: 700; color: #6c5ce7; }
.terms-radio-yes input:checked + span { color: #6c5ce7; }
#btn-register:disabled { opacity: 0.5; cursor: not-allowed; }
.login-error.hidden, #register-form.hidden { display: none !important; }
/* ===== Welcome tablet (no-config screen) ===== */
.welcome-tablet {
  width: 960px; max-width: calc(100vw - 80px); aspect-ratio: 1.9 / 1;
  background: linear-gradient(180deg, #1f1b1a 0%, #322b29 55%, #120f0f 100%);
  border-radius: 14px; padding: 8px; position: relative;
  box-shadow: 0 40px 80px rgba(80,38,46,0.40), 0 20px 40px rgba(0,0,0,0.30), 0 80px 120px rgba(40,20,30,0.25);
}
.welcome-tablet::before {
  content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 40%, rgba(0,0,0,0) 70%) border-box,
    linear-gradient(to left, rgba(255,255,255,0.40) 0%, rgba(255,255,255,0.06) 35%, rgba(0,0,0,0) 60%) border-box,
    linear-gradient(180deg, transparent, transparent) padding-box;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 2px;
}
.welcome-tablet-camera {
  position: absolute; top: 5px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 10px; border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #111 0%, #232323 100%); z-index: 5;
}
.welcome-tablet-camera::after {
  content: ""; position: absolute; top: 3px; left: 50%; width: 8px; height: 4px;
  transform: translateX(-50%); border-radius: 999px; background: rgba(120,130,150,0.45);
}
.welcome-tablet-screen {
  width: 100%; height: 100%;
  background: radial-gradient(circle at 70% 14%, rgba(255,255,255,0.07) 0, rgba(255,255,255,0) 28%),
    linear-gradient(135deg, #f1dfcc 0%, #efbba7 35%, #eea8b5 63%, #d48fe3 100%);
  border-radius: 10px; overflow: hidden;
  display: grid; grid-template-columns: 0.42fr 0.58fr;
}
.welcome-left {
  background: linear-gradient(180deg, rgba(255,248,245,0.92) 0%, rgba(247,239,237,0.94) 100%);
  padding: 28px 24px; display: flex; flex-direction: column;
}
.welcome-left-title {
  font-size: 14px; font-weight: 900; color: #1a1a2e; font-family: 'Inter', sans-serif;
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.welcome-left-desc { font-size: 10px; color: #8a7a7e; line-height: 1.5; margin: 0 0 18px; }
.setup-requirements { display: flex; flex-direction: column; gap: 10px; }
.setup-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  background: rgba(255,255,255,0.6); border-radius: 10px;
  border-left: 3px solid #5a8cf7;
}
.setup-num {
  width: 22px; height: 22px; border-radius: 50%; background: #5a8cf7; color: #fff;
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.setup-name { font-size: 12px; font-weight: 700; color: #2f2123; }
.setup-detail { font-size: 9px; color: #a99d9e; margin-top: 1px; }
.setup-download-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: auto;
  padding: 10px 16px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #5a8cf7 0%, #4a6cf0 100%);
  box-shadow: 0 8px 20px rgba(90,140,247,0.28); text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.setup-download-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(90,140,247,0.35); }
.setup-note { font-size: 8px; color: #a99d9e; text-align: center; margin-top: 8px; }
.welcome-right {
  padding: 34px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.welcome-right-title {
  font-size: 30px; font-weight: 800; color: #fff7ef; font-family: 'Arial Nova', 'Arial', sans-serif;
  letter-spacing: 0.02em; text-align: center; margin: 0 0 8px;
}
.welcome-right-desc { font-size: 11px; color: rgba(255,250,244,0.75); text-align: center; margin: 0 0 24px; }
.welcome-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 260px; }
.welcome-action-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px;
  border-radius: 14px; border: none; font-size: 13px; font-weight: 700; cursor: pointer;
  background: rgba(255,255,255,0.15); color: #fff; backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.2); transition: transform 0.15s, background 0.15s;
}
.welcome-action-btn:hover { transform: translateY(-1px); background: rgba(255,255,255,0.22); }
.welcome-action-btn.primary {
  background: rgba(255,255,255,0.9); color: #4a6cf0;
  box-shadow: 0 8px 20px rgba(74,108,240,0.18);
}
.welcome-action-btn.primary:hover { background: #fff; }
@media (max-width: 768px) {
  .welcome-tablet-screen { grid-template-columns: 1fr; }
  .welcome-left { display: none; }
  .welcome-tablet { aspect-ratio: auto; }
}

/* 내 목록 — 앱별 한도 현황 플로팅 패널.
   main 의 max-width:80% 바깥 우측 여백 (약 10%) 에 position:fixed 로
   띄운다. 1536px 뷰포트(Windows 125% 스케일) 에서 우측 여백 ≈ 153px
   이므로 패널 폭은 144px 로 잡아 main 침범 없이 여백 안에 수납.
   panel-config-items 가 hidden 이면 부모 display:none 으로 자동 숨음. */
.items-status-floating {
  position: fixed;
  top: 112px;                 /* 헤더 높이 아래 */
  right: 6px;
  width: 144px;
  max-height: calc(100vh - 130px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 11.5px;
  z-index: 40;
}
/* 1280px 미만 뷰포트는 우측 여백 자체가 너무 좁아 판독 불가 → 숨김 */
@media (max-width: 1280px) {
  .items-status-floating { display: none; }
}

/* Tablet responsive */
@media (max-width: 980px) {
  .tablet-device { width: 100%; aspect-ratio: auto; }
  .tablet-screen { grid-template-columns: 1fr; }
  .tablet-sidebar { display: none; }
  .tablet-main { min-height: 620px; padding: 28px 22px 20px; }
  .feature-carousel { gap: 10px; overflow-x: auto; padding-bottom: 8px; }
  .feature-card { min-width: 160px; }
  .bottom-strip { gap: 18px; flex-direction: column; align-items: flex-start; }
  .auth-overlay { right: 22px; bottom: 20px; }
}
@media (max-width: 640px) {
  .tablet-login-view { padding: 14px; }
  .tablet-device { max-width: 100%; border-radius: 12px; padding: 6px; }
  .tablet-screen { border-radius: 8px; }
  .brand-copy h1 { font-size: 28px; }
  .brand-copy p { width: auto; font-size: 10px; }
  .feature-card { width: 148px; height: 190px; border-radius: 20px; padding: 16px 14px 14px; }
  .feature-title { font-size: 28px; }
  .feature-next { width: 36px; height: 36px; }
  .member-list { gap: 14px; }
  .member-avatar { width: 32px; height: 32px; }
  .auth-overlay { right: 14px; bottom: 14px; width: 240px; padding: 18px 16px; }
}
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); }

/* ── Dashboard stat cards ── */
main .card:nth-child(1) { background: var(--pastel-lavender); }
main .card:nth-child(2) { background: var(--pastel-mint); }
main .card:nth-child(3) { background: var(--pastel-peach); }
main .card:nth-child(4) { background: var(--pastel-sky); }

/* ── Modal overlay cards ── */
[id$="-modal"] > .card {
    background: var(--pastel-lavender);
    box-shadow:
        0 20px 60px rgba(45,38,64,0.20),
        0 8px 24px rgba(45,38,64,0.12);
}

/* ── Desk Menu dropdown ── */
.desk-menu-item {
    display: block; padding: 8px 20px; font-size: 13px; font-weight: 500;
    color: var(--text); text-decoration: none; transition: all 0.15s;
}
.desk-menu-item:hover { background: rgba(108,92,231,0.06); color: var(--accent); }

/* ── Utility ── */
.hidden { display: none !important; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-muted { color: var(--text-muted); }
.w-full { width: 100%; }

/* ── Schedule editor — 주부 친화 preset buttons ── */
.sch-freq-btn {
    padding: 10px 8px;
    border: 2px solid #e5dff1;
    border-radius: 10px;
    background: #fff;
    color: #3a2f52;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.sch-freq-btn:hover {
    border-color: #a78bfa;
    background: #faf7ff;
}
.sch-freq-btn.sch-freq-active {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: #fff;
    box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}
/* 2026-04-26: 50대 주부 친화 — 선택/비선택 차이를 명확하게.
   ✓ 마커 + 진한 색상 대비 + 굵은 글씨 */
.sch-day-pill {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 8px 14px;
    border: 2px solid #d1c4e9;
    border-radius: 20px;
    background: #f5f5f7;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}
.sch-day-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
/* 비선택 상태에 빈 동그라미 마커 */
.sch-day-pill::before {
    content: '○';
    font-size: 14px;
    color: #9ca3af;
    font-weight: 700;
}
/* 선택 상태 = 진한 보라 채움 + 흰 글씨 + ✓ 마커 */
.sch-day-pill:has(input:checked) {
    border-color: #6c5ce7;
    background: #6c5ce7;
    color: #fff;
    box-shadow: 0 2px 6px rgba(108,92,231,0.35);
}
.sch-day-pill:has(input:checked)::before {
    content: '✓';
    color: #fff;
    font-weight: 800;
}
.sch-day-pill:hover {
    border-color: #8b5cf6;
    transform: translateY(-1px);
}
.sch-day-pill:has(input:checked):hover {
    background: #5b4cd9;
}

/* 작은 확인 창 (2026-08-11) — 사용 승인에서 등급·사용기간을 한 화면에서 정한다.
   기존에 이런 창이 없어 prompt()/confirm() 만 썼다. 고를 것이 둘 이상이면 그것으로는 안 된다. */
.modal-backdrop {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(0, 0, 0, 0.45);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-box {
    width: 100%; max-width: 480px;
    background: var(--card); color: var(--text);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 20px 22px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    max-height: 86vh; overflow-y: auto;
}
.modal-box h3 { font-size: 17px; font-weight: 600; }
.modal-box label { display: block; font-weight: 500; }
