*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --black: #0a0a0a;
    --white: #fafafa;
    --g100: #f2f2f2;
    --g200: #e4e4e4;
    --g400: #a0a0a0;
    --g600: #606060;
    --g800: #303030;
    --border: rgba(0,0,0,0.07);
    --border-s: rgba(0,0,0,0.14);
    --r: 12px;
    --rs: 8px;
    --nav: 56px;
    --side: 210px;
    --font: 'DM Sans', sans-serif;
    --mono: 'DM Mono', monospace;
    --shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.04);
}
html { font-family: var(--font); background: var(--white); color: var(--black); -webkit-font-smoothing: antialiased; }

/* NAV */
nav {
    position: fixed; top: 0; left: 0; right: 0; height: var(--nav);
    background: rgba(250,250,250,0.9); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); z-index: 100;
    display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
}
.nav-brand {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 500; letter-spacing: -0.01em; text-decoration: none; color: var(--black);
}
.nav-logo {
    width: 26px; height: 26px; background: var(--black); border-radius: 6px;
    display: grid; place-items: center;
}
.nav-logo svg { width: 14px; height: 14px; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-user {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--g600); font-weight: 400;
}
.nav-avatar {
    width: 28px; height: 28px; border-radius: 50%; background: var(--g200);
    display: grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.nav-avatar svg { width: 14px; height: 14px; stroke: var(--g400); fill: none; stroke-width: 1.8; }
.nav-username { font-size: 13px; font-weight: 500; color: var(--black); }
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 20px; border: none; cursor: pointer;
    font-family: var(--font); font-size: 13px; font-weight: 500;
    transition: all 0.15s; text-decoration: none; white-space: nowrap;
}
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--g800); box-shadow: 0 3px 10px rgba(0,0,0,0.18); }
.btn-ghost { background: transparent; color: var(--black); border: 1px solid var(--border-s); }
.btn-ghost:hover { background: var(--g100); }
.btn-danger { background: transparent; color: #e53935; border: 1px solid rgba(229,57,53,0.28); }
.btn-danger:hover { background: rgba(229,57,53,0.05); }
.btn-sm { padding: 5px 12px; font-size: 12px; }

/* LOGIN SCREEN */
.login-screen {
    display: none; position: fixed; inset: 0;
    background: var(--white); z-index: 200;
    flex-direction: column; align-items: center; justify-content: center;
}
.login-screen.show { display: flex; }
.login-box { text-align: center; max-width: 340px; padding: 20px; }
.login-icon {
    width: 52px; height: 52px; background: var(--black); border-radius: 14px;
    display: grid; place-items: center; margin: 0 auto 22px;
}
.login-icon svg { width: 26px; height: 26px; stroke: white; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.login-title { font-size: 24px; font-weight: 500; letter-spacing: -0.03em; margin-bottom: 8px; }
.login-sub { font-size: 14px; color: var(--g600); line-height: 1.6; margin-bottom: 28px; }
.btn-github {
    display: inline-flex; align-items: center; gap: 9px;
    padding: 12px 26px; background: var(--black); color: var(--white);
    border-radius: 26px; border: none; cursor: pointer;
    font-family: var(--font); font-size: 14px; font-weight: 500;
    transition: all 0.15s;
}
.btn-github:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.22); }
.btn-github svg { width: 18px; height: 18px; fill: white; flex-shrink: 0; }

/* LAYOUT */
.layout { display: flex; padding-top: var(--nav); min-height: 100vh; }

/* SIDEBAR */
.sidebar {
    width: var(--side); position: fixed; top: var(--nav); bottom: 0; left: 0;
    padding: 20px 12px; border-right: 1px solid var(--border);
    background: var(--white); overflow-y: auto;
}
.sb-section { margin-bottom: 24px; }
.sb-label {
    font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
    color: var(--g400); padding: 0 10px; margin-bottom: 4px;
}
.sb-link {
    display: flex; align-items: center; gap: 9px;
    padding: 7px 10px; border-radius: var(--rs); cursor: pointer;
    font-size: 13.5px; font-weight: 400; color: var(--g600);
    transition: all 0.12s; text-decoration: none; border: none;
    background: none; font-family: var(--font); width: 100%; text-align: left;
}
.sb-link svg { width: 15px; height: 15px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.sb-link:hover { background: var(--g100); color: var(--black); }
.sb-link.active { background: var(--black); color: white; font-weight: 500; }

/* MAIN */
.main { margin-left: var(--side); flex: 1; padding: 40px 44px; max-width: 860px; }

/* PAGE */
.page { display: none; }
.page.active { display: block; animation: up 0.18s ease both; }
@keyframes up { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

.page-head { margin-bottom: 32px; }
.page-title { font-size: 26px; font-weight: 500; letter-spacing: -0.03em; }
.page-sub { font-size: 13.5px; color: var(--g600); margin-top: 5px; }

/* CARD */
.card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--r); padding: 22px 24px; margin-bottom: 14px;
    box-shadow: var(--shadow);
}
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.card-title { font-size: 12px; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; color: var(--g400); }

/* FIELD */
.field { margin-bottom: 14px; }
.field:last-of-type { margin-bottom: 0; }
.field-label { font-size: 11.5px; font-weight: 500; color: var(--g600); margin-bottom: 5px; letter-spacing: 0.02em; }
.field input, .field textarea, .field select {
    width: 100%; padding: 9px 12px;
    font-family: var(--mono); font-size: 12.5px;
    border: 1px solid var(--border-s); border-radius: var(--rs);
    background: var(--g100); color: var(--black); resize: vertical;
    transition: border-color 0.15s, box-shadow 0.15s; outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
    border-color: var(--black); background: var(--white);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; margin-bottom: 0; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.hint-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: -4px;
    margin-bottom: 14px;
    font-size: 12px;
    color: var(--g600);
}

/* TEAM STYLE */
.inline-select {
    font-family: var(--mono);
    font-size: 12px;
    border: 1px solid var(--border-s);
    border-radius: var(--rs);
    background: var(--white);
    color: var(--black);
    padding: 7px 10px;
    outline: none;
}

.inline-select:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.app-team-row {
    margin-top: 8px;
    justify-content: flex-start;
}

/* PROFILE GRID */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.info-cell { padding: 14px 16px; background: var(--g100); border-radius: var(--rs); }
.info-cell-label { font-size: 10.5px; color: var(--g400); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 4px; }
.info-cell-value { font-size: 14px; font-weight: 500; font-family: var(--mono); color: var(--black); word-break: break-all; }

/* LIST ITEMS */
.list-item {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 13px 0; border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; padding-bottom: 0; }
.list-item:first-child { padding-top: 0; }
.item-main { flex: 1; min-width: 0; }
.item-title { font-size: 13.5px; font-weight: 500; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font-size: 11.5px; font-family: var(--mono); color: var(--g400); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-meta { font-size: 11px; color: var(--g400); margin-top: 2px; }

/* EMPTY */
.empty { text-align: center; padding: 32px 20px; }
.empty svg { width: 28px; height: 28px; stroke: var(--g200); margin: 0 auto 10px; display: block; fill: none; stroke-width: 1.5; stroke-linecap: round; }
.empty-text { font-size: 13px; color: var(--g400); }

/* BADGE */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 20px; font-size: 11px; font-weight: 500;
}
.badge-green { background: rgba(52,199,89,0.1); color: #1a8a35; }
.badge-gray  { background: var(--g100); color: var(--g600); }

/* BUNDLE ICON */
.bicon {
    width: 36px; height: 36px; border-radius: 9px; background: var(--black);
    display: grid; place-items: center; flex-shrink: 0;
}
.bicon svg { width: 18px; height: 18px; stroke: white; fill: none; stroke-width: 1.7; stroke-linecap: round; }

/* TOAST */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: var(--black); color: var(--white);
    padding: 10px 20px; border-radius: 24px; font-size: 13px; font-weight: 400;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18); opacity: 0;
    transition: all 0.22s ease; pointer-events: none; z-index: 300; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* INLINE INPUT ROW */
.inline-row { display: flex; gap: 8px; align-items: flex-end; }
.inline-row .field { flex: 1; margin-bottom: 0; }