/* ── Variables ──────────────────────────────────────────────── */
:root {
    --bg:           #0a0818;
    --bg2:          #100d22;
    --panel:        #16122e;
    --panel-hi:     #1e1940;
    --border:       rgba(120, 90, 255, 0.18);
    --border-hi:    rgba(120, 90, 255, 0.45);
    --text:         #e4e0f8;
    --muted:        #8b82b8;
    --brand:        #7c5cfc;
    --brand-dark:   #5b3fd6;
    --brand-glow:   rgba(124, 92, 252, 0.35);
    --accent:       #00d4ff;
    --accent-glow:  rgba(0, 212, 255, 0.25);
    --gold:         #f5c542;
    --error:        #ff6b6b;
    --success:      #2dd4aa;
    --radius:       12px;
    --radius-lg:    18px;
    --shadow:       0 4px 24px rgba(0,0,0,.5);
    --shadow-brand: 0 0 20px var(--brand-glow);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124,92,252,.18), transparent),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(0,212,255,.06), transparent);
    min-height: 100vh;
    line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--brand-dark); border-radius: 3px; }

/* ── Layout ─────────────────────────────────────────────────── */
.container { max-width: 1020px; margin: 0 auto; padding: 0 18px; }
main.container { padding-top: 28px; padding-bottom: 56px; }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
    background: rgba(10, 8, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 66px;
    gap: 12px;
}
.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.brand-logo {
    height: 44px;
    width: auto;
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background .15s, color .15s;
}
.nav a:hover { color: var(--text); background: var(--panel-hi); }
.nav .btn { color: #fff; }
.nav .btn:hover { color: #fff; }
.nav-admin { color: var(--brand) !important; font-weight: 600; }
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 7px 11px;
    cursor: pointer;
    font-size: 18px;
    color: var(--text);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn, .link-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 9px 18px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .2px;
    transition: opacity .15s, box-shadow .15s, transform .1s;
    white-space: nowrap;
    box-shadow: 0 2px 12px var(--brand-glow);
}
.btn:hover, .link-button:hover {
    opacity: .9;
    box-shadow: 0 4px 20px var(--brand-glow);
    color: #fff;
    transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn.secondary {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--border-hi);
    box-shadow: none;
}
.btn.secondary:hover {
    background: var(--panel-hi);
    color: var(--text);
    box-shadow: none;
}
.btn-block { width: 100%; text-align: center; }
.btn-hero { padding: 12px 28px; font-size: 15px; }
.link-button { padding: 7px 13px; background: transparent; color: var(--muted); border: 1px solid var(--border); box-shadow: none; }
.link-button:hover { color: var(--text); background: var(--panel-hi); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-danger {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    box-shadow: 0 2px 10px rgba(229,62,62,.3);
}
.btn-danger:hover { opacity: .9; }
.btn-client {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 2px 14px rgba(16,185,129,.3);
    padding: 13px 28px;
    font-size: 15px;
}
.btn-client:hover { opacity: .9; box-shadow: 0 4px 20px rgba(16,185,129,.4); }
.btn-client { display: inline-flex; align-items: center; gap: 8px; }
.btn-hotel-icon { width: 24px; height: 24px; image-rendering: pixelated; flex-shrink: 0; }

/* ── Cards / panels ─────────────────────────────────────────── */
.card {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.hero {
    border: 1px solid var(--border);
    background: var(--panel);
    border-radius: var(--radius-lg);
    padding: 26px;
}
.actions { margin-top: 18px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Forms ──────────────────────────────────────────────────── */
form { display: flex; flex-direction: column; gap: 10px; }
label { font-size: 13px; color: var(--muted); font-weight: 500; }
input, textarea, select {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 14px;
    background: var(--bg2);
    width: 100%;
    color: var(--text);
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
textarea { resize: vertical; min-height: 130px; }
.req { color: var(--error); }
.checkbox-label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); cursor: pointer; }
.checkbox-label input { width: auto; }
.form-actions { margin-top: 8px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert.error  { background: rgba(255,107,107,.12); color: #ff9090; border: 1px solid rgba(255,107,107,.25); }
.alert.success{ background: rgba(45,212,170,.12); color: #2dd4aa; border: 1px solid rgba(45,212,170,.25); }

/* ── Generic grid ───────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px,1fr)); gap: 14px; }
.grid article {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-hi);
    padding: 14px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    padding-top: 20px;
    padding-bottom: 24px;
    font-size: 13px;
    text-align: center;
}

/* ── Auth ───────────────────────────────────────────────────── */
.auth-wrap { display: flex; justify-content: center; padding-top: 20px; }
.auth-card { max-width: 460px; width: 100%; }
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h1 { font-size: 24px; color: var(--text); font-weight: 800; }
.auth-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }
.auth-link { text-align: center; font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ── Home hero ──────────────────────────────────────────────── */
.hero-main {
    display: flex;
    gap: 32px;
    align-items: center;
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-hi) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    margin-bottom: 36px;
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.05);
    position: relative;
    overflow: hidden;
}
.hero-main::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(124,92,252,.15), transparent 70%);
    pointer-events: none;
}
.hero-content { flex: 1; position: relative; }
.hero-title { font-size: 34px; line-height: 1.15; color: var(--text); font-weight: 800; letter-spacing: -.5px; }
.hero-brand {
    background: linear-gradient(135deg, var(--brand) 30%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-subtitle { color: var(--muted); margin-top: 10px; font-size: 16px; }
.hero-stats { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.stat-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 16px;
}
.stat-badge.online { border-color: rgba(45,212,170,.35); }
.stat-dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; display: inline-block; box-shadow: 0 0 6px var(--success); }
.stat-num { font-weight: 800; font-size: 20px; color: var(--text); }
.stat-label { font-size: 12px; color: var(--muted); }
.hero-img {
    width: 180px;
    min-height: 180px;
    background: url('../images/habcity/rooms.png') center/contain no-repeat;
    flex-shrink: 0;
    filter: drop-shadow(0 0 20px var(--brand-glow));
}

/* ── Login inline en el hero (estilo Hartico) ───────────────── */
.hero-login-only { padding: 32px 36px; }
.hero-login {
    display: flex;
    align-items: center;
    gap: 28px;
    width: 100%;
}
.frank-wave {
    width: 150px;
    height: auto;
    align-self: center;
    flex-shrink: 0;
    image-rendering: pixelated;
    filter: drop-shadow(0 8px 14px rgba(0,0,0,.45));
    pointer-events: none;
    user-select: none;
}
.login-box {
    flex: 1;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}
.login-box .login-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 14px;
    text-align: center;
}
.login-box form { display: flex; flex-direction: column; gap: 6px; }
.login-box label { margin-top: 6px; }
.login-box .btn-block { margin-top: 14px; }
.login-box .login-register { margin-top: 10px; }

/* ── Home sections ──────────────────────────────────────────── */
.home-section { margin-bottom: 40px; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; }
.section-header h2 { font-size: 18px; color: var(--text); font-weight: 700; }
.section-more { font-size: 13px; color: var(--brand); }
.section-more:hover { color: var(--accent); }

/* ── News grid ──────────────────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px,1fr)); gap: 20px; }
.news-grid--full { grid-template-columns: repeat(auto-fit, minmax(300px,1fr)); }
.news-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.news-card:hover {
    border-color: var(--border-hi);
    box-shadow: var(--shadow), var(--shadow-brand);
    transform: translateY(-3px);
}
.news-card-img { height: 170px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img--placeholder {
    background: linear-gradient(135deg, var(--panel-hi), var(--bg2));
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    opacity: .4;
}
.news-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.news-card-title { font-size: 15px; line-height: 1.35; font-weight: 600; }
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--accent); }
.news-card-excerpt { color: var(--muted); font-size: 13px; flex: 1; line-height: 1.55; }
.news-card-meta { display: flex; gap: 10px; font-size: 12px; color: var(--muted); }
.news-card-btn { margin-top: auto; align-self: flex-start; }

/* ── News article ───────────────────────────────────────────── */
.news-article { max-width: 740px; margin: 0 auto; }
.news-article-cover img { width: 100%; border-radius: var(--radius-lg); margin-bottom: 22px; max-height: 380px; object-fit: cover; }
.news-article-header { margin-bottom: 18px; }
.news-article-header h1 { font-size: 26px; line-height: 1.2; color: var(--text); font-weight: 800; }
.news-article-meta { display: flex; gap: 16px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.news-article-excerpt { font-style: italic; color: var(--muted); margin-bottom: 16px; border-left: 3px solid var(--brand); padding-left: 14px; }
.news-article-body {
    font-size: 15px;
    line-height: 1.75;
    white-space: pre-wrap;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
}
.news-article-back { margin-top: 24px; }

/* ── Features grid (home) ───────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 20px; }
.feature-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
    transition: border-color .2s, transform .2s;
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--brand-glow), transparent);
    opacity: 0;
    transition: opacity .2s;
}
.feature-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { font-size: 40px; margin-bottom: 12px; position: relative; }
.feature-card h3 { color: var(--text); margin-bottom: 8px; font-size: 16px; font-weight: 700; position: relative; }
.feature-card p { font-size: 13px; color: var(--muted); position: relative; line-height: 1.55; }

/* ── Profile page ───────────────────────────────────────────── */
.profile-page { display: flex; flex-direction: column; gap: 24px; }
.profile-top {
    background: linear-gradient(135deg, var(--panel) 0%, var(--panel-hi) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.profile-top::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, var(--brand-glow), transparent 65%);
    pointer-events: none;
}
.profile-avatar-wrap { flex-shrink: 0; position: relative; }
.profile-avatar { width: auto; height: 180px; image-rendering: pixelated; filter: drop-shadow(0 4px 12px rgba(0,0,0,.5)); }
.profile-info { flex: 1; }
.profile-username { font-size: 26px; color: var(--text); margin-bottom: 4px; font-weight: 800; }
.profile-motto { color: var(--muted); font-style: italic; margin-bottom: 12px; font-size: 14px; }
.profile-rank-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 13px;
    margin-bottom: 10px;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--brand-glow);
}
.profile-since { font-size: 12px; color: var(--muted); }
.profile-actions { display: flex; flex-direction: column; gap: 12px; align-items: flex-end; justify-content: center; flex-shrink: 0; }

.profile-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px,1fr)); gap: 14px; }
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.stat-card:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.stat-icon { width: 28px; height: 28px; object-fit: contain; }
.stat-val { font-size: 22px; font-weight: 800; color: var(--text); }
.stat-key { font-size: 12px; color: var(--muted); font-weight: 500; }

.client-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

.profile-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.profile-section {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow);
}
.profile-section h2 { font-size: 16px; color: var(--text); margin-bottom: 14px; font-weight: 700; }

/* News mini */
.news-list-mini { display: flex; flex-direction: column; gap: 10px; }
.news-mini-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}
.news-mini-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-mini-title { color: var(--text); text-decoration: none; flex: 1; }
.news-mini-title:hover { color: var(--accent); }
.news-mini-date { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Friends grid */
.friends-grid { display: flex; flex-wrap: wrap; gap: 14px; }
.friend-card { display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; cursor: default; }
.friend-avatar { width: auto; height: 64px; image-rendering: pixelated; }
.friend-name { font-size: 11px; color: var(--muted); max-width: 64px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-online-dot {
    width: 9px;
    height: 9px;
    background: var(--success);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    right: 2px;
    border: 2px solid var(--panel);
    box-shadow: 0 0 5px var(--success);
}
.muted-text { color: var(--muted); font-size: 14px; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 28px; }
.pagination-info { font-size: 13px; color: var(--muted); }

/* ── Page header ────────────────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 24px; color: var(--text); font-weight: 800; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 3px; }

/* ── Admin ──────────────────────────────────────────────────── */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 20px; margin-top: 8px; }
.admin-menu-card {
    display: flex;
    gap: 18px;
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.admin-menu-card:hover {
    border-color: var(--border-hi);
    box-shadow: var(--shadow), var(--shadow-brand);
    transform: translateY(-2px);
    color: var(--text);
}
.admin-menu-icon { font-size: 34px; flex-shrink: 0; }
.admin-menu-card strong { display: block; color: var(--text); margin-bottom: 5px; font-size: 15px; }
.admin-menu-card p { font-size: 13px; color: var(--muted); }

.admin-table-wrap { overflow-x: auto; border-radius: var(--radius); }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.admin-table th, .admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.admin-table th { background: var(--panel-hi); color: var(--text); font-weight: 700; font-size: 13px; letter-spacing: .3px; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--panel-hi); }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-block; border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 600; }
.badge-ok  { background: rgba(45,212,170,.15); color: var(--success); border: 1px solid rgba(45,212,170,.3); }
.badge-draft { background: var(--panel-hi); color: var(--muted); border: 1px solid var(--border); }

.admin-form-card { max-width: 740px; }

/* ── Community / rankings ───────────────────────────────────── */
.ranking-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.rank-tab {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 9px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.rank-tab.active, .rank-tab:hover {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 12px var(--brand-glow);
}
.rank-panel { display: none; }
.rank-panel.active { display: block; }
.rank-list { display: flex; flex-direction: column; gap: 8px; max-width: 660px; }
.rank-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: border-color .15s, transform .15s;
}
.rank-row:hover { border-color: var(--border-hi); transform: translateX(3px); }
.rank-row--top { border-color: rgba(245,197,66,.3); background: linear-gradient(90deg, rgba(245,197,66,.06), var(--panel)); }
.rank-pos { width: 30px; font-weight: 800; font-size: 17px; color: var(--brand); text-align: center; flex-shrink: 0; }
.rank-row--top .rank-pos { color: var(--gold); }
.rank-avatar { height: 44px; width: auto; image-rendering: pixelated; flex-shrink: 0; }
.rank-username { flex: 1; font-size: 14px; font-weight: 500; }
.rank-value { font-weight: 800; font-size: 15px; color: var(--text); white-space: nowrap; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 700px) {
    .nav-toggle { display: block; }
    .nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        background: rgba(10,8,24,.97);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border);
        padding: 12px 18px;
        z-index: 99;
    }
    .nav.nav-open { display: flex; }
    .nav a, .nav form { padding: 10px 0; border-bottom: 1px solid var(--border); width: 100%; }
    .nav a:last-child, .nav form:last-child { border-bottom: none; }
    .topbar { position: relative; }

    .hero-main { flex-direction: column; padding: 28px 22px; }
    .hero-img { width: 100%; height: 130px; }
    .hero-title { font-size: 26px; }
    .hero-login { flex-direction: column; gap: 16px; }
    .login-box { width: 100%; }
    .brand-logo { height: 38px; }

    .profile-top { flex-direction: column; align-items: center; text-align: center; }
    .profile-avatar { height: 140px; }
    .profile-lower { grid-template-columns: 1fr; }

    .news-grid, .news-grid--full { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .admin-table th:nth-child(2), .admin-table td:nth-child(2) { display: none; }
}
@media (max-width: 480px) {
    .profile-stats { grid-template-columns: repeat(2,1fr); }
    .profile-actions { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; }
    .btn-client { width: 100%; text-align: center; justify-content: center; }
}
