:root {
    --background: #f7f5f0;
    --foreground: #1f2317;
    --surface: #ffffff;
    --border: #e3ded2;
    --brand: #2f4a34;
    --brand-dark: #1f331f;
    --accent: #c17a3d;
    --accent-dark: #a4622c;
    --muted: #6b6a5f;
    --error-bg: #fdecec;
    --error-fg: #b3261e;
    --team-pink: #ff3399;
    --team-yellow: #fadd06;
    --team-blue: #5b9bd5;
    --team-gradient: linear-gradient(90deg, var(--team-pink) 0%, var(--team-yellow) 50%, var(--team-blue) 100%);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--foreground);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-header {
    background: var(--team-gradient);
    color: #fff;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.brand-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-link,
.nav-link-active {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.nav-link {
    color: rgba(255, 255, 255, 0.92);
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
}

.nav-link-active {
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.header-user-name {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.app-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 16px;
    width: 100%;
    flex: 1;
}

.app-footer {
    border-top: 1px solid var(--border);
    padding: 20px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-link:hover {
    border-color: var(--brand);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 4px;
}

.section-subtitle {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}

.btn-accent:hover {
    background: var(--accent-dark);
}

.btn-outline {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: rgba(0, 0, 0, 0.04);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.9rem;
    font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 74, 52, 0.15);
}

.field-hint {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--muted);
}

.field-error {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--error-fg);
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-fg);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.04);
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tab-link,
.tab-link-active {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--border);
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 500;
}

.tab-link {
    background: rgba(0, 0, 0, 0.04);
}

.tab-link:hover {
    background: rgba(0, 0, 0, 0.08);
}

.tab-link-active {
    border-color: var(--brand);
    background: rgba(47, 74, 52, 0.1);
    color: var(--brand-dark);
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.avatar {
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(47, 74, 52, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--brand-dark);
}

.grid {
    display: grid;
    gap: 16px;
}

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
    .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.muted {
    color: var(--muted);
}

.text-sm {
    font-size: 0.85rem;
}

.photo-picker {
    display: flex;
    align-items: center;
    gap: 16px;
}

.photo-preview {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 0.7rem;
    color: var(--muted);
}

.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

video {
    background: #000;
    width: 100%;
    display: block;
}

.social-images {
    display: grid;
    gap: 2px;
    background: rgba(0, 0, 0, 0.05);
}

.social-images img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.empty-state {
    padding: 24px;
    color: var(--muted);
    font-size: 0.9rem;
}
