@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Source+Serif+4:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --serif: 'Source Serif 4', Georgia, serif;
    --sans: 'Outfit', -apple-system, sans-serif;
    --teal: #0d9488;
    --teal-light: #14b8a6;
    --teal-dark: #0f766e;
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --bg: #f8fafb;
    --white: #ffffff;
    --text: #1e293b;
    --dim: #475569;
    --muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.1);
    --r: 12px;
    --r-sm: 8px;
    --red: #ef4444;
    --green: #22c55e;
    --amber: #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* NAV */
.nav { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav-logo { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--teal-dark); letter-spacing: -0.5px; }
.nav-logo span { color: var(--teal-light); font-weight: 400; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--teal-100); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--teal-dark); font-size: 14px; overflow: hidden; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* CONTAINER */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 520px; margin: 0 auto; padding: 0 20px; }
.container-md { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* BUTTONS */
.btn { padding: 12px 28px; border: none; border-radius: var(--r-sm); font-family: var(--sans); font-size: 15px; font-weight: 600; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.4; }
.btn-teal { background: var(--teal); color: #fff; }
.btn-teal:hover { background: var(--teal-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-white { background: var(--white); color: var(--text); border: 1px solid var(--border); }
.btn-white:hover { border-color: var(--teal); color: var(--teal); }
.btn-outline { background: none; border: 1.5px solid var(--teal); color: var(--teal); }
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-full { width: 100%; }
.btn-danger { background: #fef2f2; color: var(--red); border: 1px solid #fecaca; }
.btn-danger:hover { background: var(--red); color: #fff; }

/* FORM */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 500; color: var(--dim); margin-bottom: 6px; }
.form-input { width: 100%; padding: 12px 16px; border: 1.5px solid var(--border); border-radius: var(--r-sm); font-family: var(--sans); font-size: 15px; outline: none; transition: border .2s, box-shadow .2s; background: var(--white); color: var(--text); }
.form-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,.1); }
.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; min-height: 100px; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%2394a3b8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-error { background: #fef2f2; color: var(--red); padding: 12px 16px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 16px; }

/* CARD */
.card { background: var(--white); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; transition: all .25s; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 20px; }

/* BADGE */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.badge-teal { background: var(--teal-100); color: var(--teal-dark); }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fef2f2; color: var(--red); }

/* TOGGLE */
.toggle { position: relative; width: 52px; height: 28px; background: var(--border); border-radius: 100px; cursor: pointer; transition: background .3s; flex-shrink: 0; }
.toggle.on { background: var(--teal); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: transform .3s; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.toggle.on::after { transform: translateX(24px); }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; padding: 14px 24px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; color: #fff; z-index: 999; transform: translateY(80px); opacity: 0; transition: all .3s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.ok { background: var(--green); }
.toast.no { background: var(--red); }

/* TABS */
.tabs { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 28px; }
.tab { padding: 14px 28px; font-size: 15px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .2s; position: relative; border: none; background: none; font-family: var(--sans); }
.tab.active { color: var(--teal); }
.tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--teal); }
.tab:hover { color: var(--teal-dark); }

/* TAG */
.tag { display: inline-block; padding: 4px 10px; background: var(--bg); border-radius: 6px; font-size: 12px; color: var(--dim); margin: 2px; }

/* EMPTY STATE */
.empty { text-align: center; padding: 60px 20px; }
.empty-icon { width: 64px; height: 64px; background: var(--teal-50); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.empty-icon svg { width: 28px; height: 28px; fill: var(--teal); }
.empty h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.empty p { color: var(--muted); font-size: 14px; }

/* FOOTER */
.footer { background: var(--white); border-top: 1px solid var(--border); padding: 24px 0; text-align: center; font-size: 13px; color: var(--muted); margin-top: 60px; }

/* RESPONSIVE */
@media (max-width: 640px) {
    .form-row { grid-template-columns: 1fr; }
    .nav-links .btn span { display: none; }
    .tabs { overflow-x: auto; }
    .tab { padding: 12px 18px; font-size: 14px; white-space: nowrap; }
}
