:root {
    --bg: #0f172a;
    --bg-light: #111827;
    --card-bg: #ffffff;
    --accent: #f97316;
    --accent-soft: #ffedd5;
    --accent-dark: #c2410c;
    --text-main: #0f172a;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --radius-lg: 1rem;
    --radius-md: .75rem;
    --shadow-soft: 0 18px 40px rgba(15,23,42,.15);
    --shadow-card: 0 10px 30px rgba(15,23,42,.08);
}

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
    background: radial-gradient(circle at top, #1f2937, #020617 55%);
}

/* Containers */
.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: rgba(15,23,42,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(148,163,184,0.35);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 0;
}

.brand a {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: #e5e7eb;
    font-weight: 600;
    letter-spacing: .04em;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: .9rem;
    background: radial-gradient(circle at 30% 0, #fed7aa, #f97316);
    color: #111827;
    font-weight: 700;
    font-size: .9rem;
    box-shadow: 0 10px 24px rgba(249,115,22,.6);
}

.brand-text {
    font-size: .95rem;
}

.main-nav {
    display: flex;
    gap: 1rem;
}

.main-nav a {
    text-decoration: none;
    color: #e5e7eb;
    font-size: .85rem;
    padding: .35rem .7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    transition: all .18s ease;
}

.main-nav a:hover {
    border-color: rgba(249,115,22,.35);
    background: rgba(15,23,42,0.8);
}

.header-user {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.header-user a {
    color: #e5e7eb;
    text-decoration: none;
    font-size: .8rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .4rem .9rem;
    border-radius: 999px;
    font-size: .8rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #111827;
    font-weight: 600;
    box-shadow: 0 12px 28px rgba(249,115,22,.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(249,115,22,.6);
}

.btn-ghost {
    background: rgba(15,23,42,.6);
    color: #e5e7eb;
    border: 1px solid rgba(148,163,184,0.7);
}

.btn-ghost:hover {
    background: rgba(15,23,42,.9);
}

/* Nav toggle (mobile) */
.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(148,163,184,0.7);
    color: #e5e7eb;
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: 1.1rem;
}

/* Main layout */
.main-content {
    padding: 1.5rem 1rem 2.5rem;
}

/* Cards */
.card {
    background: radial-gradient(circle at top left, rgba(249,115,22,0.06), rgba(15,23,42,0.96));
    border-radius: var(--radius-lg);
    padding: 1.4rem 1.4rem 1.2rem;
    border: 1px solid rgba(148,163,184,0.5);
    box-shadow: var(--shadow-card);
    color: #e5e7eb;
}

.card + .card {
    margin-top: 1rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .8rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: .8rem;
    color: #9ca3af;
}

.card-body {
    font-size: .86rem;
}

/* Form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem .8rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.form-group-full {
    grid-column: 1 / -1;
}

label {
    font-size: .75rem;
    color: #d1d5db;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: .55rem .65rem;
    border-radius: .6rem;
    border: 1px solid rgba(148,163,184,0.7);
    background: rgba(15,23,42,.9);
    color: #e5e7eb;
    font-size: .84rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px rgba(249,115,22,0.6);
}

input::placeholder {
    color: #6b7280;
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    align-items: center;
}

.text-link {
    font-size: .8rem;
    color: #f97316;
    text-decoration: none;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: .8rem;
    font-size: .8rem;
}

.table th,
.table td {
    padding: .45rem .5rem;
    border-bottom: 1px solid rgba(55,65,81,0.9);
    color: #e5e7eb;
}

.table th {
    text-align: left;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9ca3af;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .1rem .5rem;
    border-radius: 999px;
    font-size: .7rem;
    border: 1px solid rgba(148,163,184,0.7);
    color: #e5e7eb;
}

.badge-soft {
    background: rgba(249,115,22,0.12);
    border-color: rgba(249,115,22,0.4);
}

/* Footer */
.site-footer {
    border-top: 1px solid rgba(148,163,184,0.4);
    margin-top: 1rem;
}

.footer-inner {
    padding: 1rem 0 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: .8rem;
}

.footer-meta {
    margin-top: .25rem;
    font-size: .75rem;
    color: #6b7280;
}

/* Profile */
.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid rgba(249,115,22,0.6);
    box-shadow: 0 10px 20px rgba(15,23,42,.6);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Alerts */
.alert {
    border-radius: .7rem;
    padding: .6rem .8rem;
    margin-bottom: .8rem;
    font-size: .8rem;
}

.alert-error {
    background: rgba(220,38,38,0.1);
    border: 1px solid rgba(248,113,113,0.9);
    color: #fecaca;
}

.alert-success {
    background: rgba(22,163,74,0.12);
    border: 1px solid rgba(52,211,153,0.8);
    color: #bbf7d0;
}

/* Members list */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: .7rem;
    margin-top: .8rem;
}

.member-card {
    border-radius: var(--radius-md);
    padding: .6rem;
    border: 1px solid rgba(148,163,184,0.6);
    background: rgba(15,23,42,0.8);
    display: flex;
    gap: .6rem;
    align-items: center;
}

.member-card img {
    width: 32px;
    height: 32px;
    border-radius: 999px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        gap: .55rem;
    }
    .main-nav {
        display: none;
    }
    body.nav-open .main-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-top: .4rem;
    }
    .header-user {
        margin-left: auto;
    }
    .nav-toggle {
        display: inline-flex;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}
