/* ===== GEOM FONT ===== */
@font-face { font-family: 'Geom'; src: url('fonts/Geom-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geom'; src: url('fonts/Geom-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geom'; src: url('fonts/Geom-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geom'; src: url('fonts/Geom-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geom'; src: url('fonts/Geom-Black.woff2') format('woff2'); font-weight: 900; font-style: normal; font-display: swap; }

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

:root {
    --bg: #ecedef;
    --surface: #f4f4f6;
    --white: #ffffff;
    --black: #0a0a0a;
    --grey-900: #1a1a1a;
    --grey-800: #2d2d2d;
    --grey-700: #3d3d3d;
    --grey-600: #555;
    --grey-500: #777;
    --grey-400: #999;
    --grey-300: #bbb;
    --grey-200: #d6d6d8;
    --grey-150: #e2e2e4;
    --grey-100: #ededef;
    --grey-50: #f6f6f7;
    --accent: #E63C94;
    --accent-light: rgba(230, 60, 148, 0.06);
    --accent-glow: rgba(230, 60, 148, 0.12);
    --green: #41D252;
    --green-subtle: rgba(65, 210, 82, 0.08);
    --negative: #E14751;
    --negative-subtle: rgba(225, 71, 81, 0.08);
    --font: 'Geom', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --sidebar-w: 200px;
}

html { -webkit-font-smoothing: antialiased; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--black);
    font-size: 13px;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: var(--font); }

/* ===== LAYOUT ===== */
.app { display: flex; height: 100vh; overflow: hidden; position: relative; }

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--grey-200);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar.collapsed { width: 0; overflow: hidden; border: none; }

.sidebar-header {
    padding: 16px 14px;
    border-bottom: 1px solid var(--grey-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 8px; }
.logo-mark {
    width: 24px; height: 24px;
    background: var(--black); color: var(--white);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.logo span { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; color: var(--black); }

.sidebar-collapse-btn {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    color: var(--grey-400); transition: all 0.15s;
}
.sidebar-collapse-btn:hover { color: var(--black); }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 18px; }
.nav-section { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 9px; font-weight: 600; letter-spacing: 0.14em; color: var(--grey-400); padding: 4px 8px 6px; }
.nav-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 8px; color: var(--grey-600);
    font-size: 12px; font-weight: 450; transition: all 0.12s;
}
.nav-item:hover { color: var(--black); background: var(--grey-50); }
.nav-item.active { color: var(--accent); background: var(--accent-light); font-weight: 500; }
.nav-item svg { flex-shrink: 0; width: 14px; height: 14px; }

.sidebar-footer { padding: 12px 14px; border-top: 1px solid var(--grey-100); }
.user-info { display: flex; align-items: center; gap: 8px; }
.user-avatar { width: 26px; height: 26px; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }
.user-details { display: flex; flex-direction: column; }
.user-name { font-size: 11px; font-weight: 500; }
.user-plan { font-size: 9px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent); }

/* ===== MAIN ===== */
.main { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* ===== TOPBAR ===== */
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 28px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8fa 100%);
    border-bottom: 1px solid var(--grey-200);
    flex-shrink: 0; position: relative;
}
.topbar::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: rgba(255,255,255,0.9); }
.topbar-left { display: flex; align-items: center; gap: 14px; }

.sidebar-toggle-btn {
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--grey-200); color: var(--grey-500);
    background: var(--white); transition: all 0.12s;
}
.sidebar-toggle-btn:hover { color: var(--black); border-color: var(--accent); }

.topbar-title-group { display: flex; flex-direction: column; gap: 0; }
.page-title { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.page-subtitle { font-size: 10px; color: var(--grey-400); font-weight: 400; }

/* ===== CONTENT ===== */
.content { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }

/* ===== CARDS ===== */
.card {
    background: linear-gradient(180deg, #ffffff 0%, #f3f3f5 100%);
    border: 1px solid var(--grey-200);
    overflow: hidden; position: relative;
    box-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 2px 6px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s, transform 0.2s;
}
.card::before { content:''; position: absolute; top:0; left:0; right:0; height:1px; background: rgba(255,255,255,0.9); z-index:1; }
.card:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.6), 0 4px 16px rgba(0,0,0,0.06); transform: translateY(-1px); }
.card-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; border-bottom: 1px solid var(--grey-150);
    background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, transparent 100%);
}
.card-head h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.01em; }
.card-desc { font-size: 11px; color: var(--grey-500); padding: 12px 20px; }

/* ===== FORM ELEMENTS ===== */
.form-group { display: flex; flex-direction: column; gap: 6px; padding: 6px 0; }
.form-label { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; color: var(--grey-400); text-transform: uppercase; }
.f-select, .f-input {
    padding: 7px 10px; border: 1px solid var(--grey-200);
    font-family: var(--font); font-size: 11px;
    background: var(--white); outline: none;
    transition: border-color 0.12s; color: var(--black);
}
.f-select:focus, .f-input:focus { border-color: var(--accent); }
.f-select {
    cursor: pointer; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='8' height='5' viewBox='0 0 8 5' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L4 4L7 1' stroke='%23999' stroke-width='1.2'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px;
}
.f-input { width: 80px; }
.f-input-wide { width: 140px; }

/* ===== RADIO ===== */
.radio-label {
    display: flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 500; color: var(--grey-600); cursor: pointer;
}
.radio-label input { display: none; }
.radio-custom {
    width: 14px; height: 14px;
    border: 1.5px solid var(--grey-300); border-radius: 50%;
    position: relative; transition: border-color 0.12s;
}
.radio-label input:checked ~ .radio-custom { border-color: var(--accent); }
.radio-label input:checked ~ .radio-custom::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 6px; height: 6px; background: var(--accent); border-radius: 50%;
}

/* ===== TOGGLE SWITCH ===== */
.toggle-btn input { display: none; }
.toggle-slider { width: 32px; height: 18px; background: var(--grey-200); display: inline-block; position: relative; cursor: pointer; transition: background 0.2s; }
.toggle-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; background: var(--white); transition: transform 0.2s; }
.toggle-btn input:checked + .toggle-slider { background: var(--accent); }
.toggle-btn input:checked + .toggle-slider::after { transform: translateX(14px); }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 8000; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: var(--white); border: 1px solid var(--grey-200);
    padding: 12px 16px; min-width: 260px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    animation: toastIn 0.3s ease;
    display: flex; align-items: center; gap: 10px;
    font-size: 12px; font-weight: 450; transition: all 0.3s;
}
.toast.leaving { opacity: 0; transform: translateX(20px); }
.toast-icon { width: 8px; height: 8px; background: var(--accent); flex-shrink: 0; }

@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000; }
    .sidebar.collapsed { transform: translateX(-100%); width: var(--sidebar-w); }
    .content { padding: 18px 14px; }
    .topbar { padding: 12px 14px; }
}
