/* ============================================================
   Naruto RPG — CSS Global
   Dark theme com laranja ninja, moderno/minimalista
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Exo+2:wght@300;400;500;600&display=swap');

:root {
    --bg-base:     #09090f;
    --bg-surface:  #0f0f18;
    --bg-card:     #14141e;
    --bg-hover:    #1a1a28;
    --border:      #22222f;
    --border-glow: rgba(255,107,26,.3);

    --orange-600:  #d4520e;
    --orange-500:  #ff6b1a;
    --orange-400:  #ff8c42;
    --orange-300:  #ffad70;
    --orange-glow: rgba(255,107,26,.18);

    --text-primary:   #e2e2ee;
    --text-secondary: #888899;
    --text-muted:     #4a4a62;

    --hp-start:      #c0392b; --hp-end: #e74c3c;
    --chakra-start:  #1d4ed8; --chakra-end: #3b82f6;
    --stamina-start: #15803d; --stamina-end: #22c55e;
    --xp-start:      #b45309; --xp-end: #f59e0b;

    --rank-estudante: #6b7280;
    --rank-genin:     #22c55e;
    --rank-chunin:    #3b82f6;
    --rank-jonin:     #a855f7;
    --rank-anbu:      #ef4444;
    --rank-sannin:    #f97316;

    --sidebar-w: 230px;
    --topbar-h:  58px;
    --radius:    10px;
    --radius-sm: 6px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

h1,h2,h3,h4,
.stat-num,
.logo-text,
.rank-badge,
.kanji { font-family: 'Rajdhani', sans-serif; }

a { color: var(--orange-400); text-decoration: none; }
a:hover { color: var(--orange-300); text-decoration: underline; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 20% 50%, rgba(255,107,26,.06) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 20%, rgba(59,130,246,.04) 0%, transparent 50%),
                var(--bg-base);
    padding: 1.5rem;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.25rem 2rem;
    box-shadow: 0 0 60px rgba(255,107,26,.06);
}

.create-char-container { max-width: 560px; }

.auth-logo {
    text-align: center;
    margin-bottom: 1.75rem;
}
.auth-logo .kanji {
    display: block;
    font-size: 3.5rem;
    color: var(--orange-500);
    text-shadow: 0 0 30px var(--orange-glow);
    margin-bottom: .25rem;
}
.auth-logo h1 { font-size: 1.9rem; color: var(--text-primary); }
.auth-logo p  { color: var(--text-secondary); font-size: .9rem; }

/* Auth form */
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .35rem; }
.form-group label { font-size: .82rem; color: var(--text-secondary); font-weight: 500; letter-spacing: .03em; }

input[type=text], input[type=email], input[type=password], select, textarea {
    width: 100%;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .6rem .85rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: .9rem;
    transition: border-color .2s;
    outline: none;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--orange-500);
    box-shadow: 0 0 0 3px var(--orange-glow);
}
select { cursor: pointer; }
input::placeholder { color: var(--text-muted); }

.auth-switch { text-align: center; margin-top: 1.25rem; color: var(--text-secondary); font-size: .88rem; }

.auth-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
}
.feature-item {
    display: flex; align-items: center; gap: .5rem;
    font-size: .8rem; color: var(--text-secondary);
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: .5rem .65rem;
}

/* Class cards */
.class-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }
.class-card {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: .35rem;
    background: var(--bg-hover);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem .75rem;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.class-card input[type=radio] { display: none; }
.class-card:hover { border-color: var(--orange-500); }
.class-card.selected { border-color: var(--orange-500); background: rgba(255,107,26,.08); }
.class-icon { font-size: 2rem; }
.class-label { font-family: 'Rajdhani', sans-serif; font-weight: 700; font-size: 1.05rem; }
.class-desc  { font-size: .76rem; color: var(--text-secondary); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    padding: .7rem 1rem;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    margin-bottom: .75rem;
}
.alert-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.12);  border: 1px solid rgba(34,197,94,.3);  color: #86efac;  }
.alert-info    { background: rgba(59,130,246,.12); border: 1px solid rgba(59,130,246,.3); color: #93c5fd; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: linear-gradient(135deg, var(--orange-600), var(--orange-500));
    border: none;
    border-radius: var(--radius-sm);
    padding: .6rem 1.4rem;
    color: #fff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .04em;
    cursor: pointer;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 2px 16px rgba(255,107,26,.25);
    text-decoration: none;
}
.btn-primary:hover { opacity: .9; box-shadow: 0 4px 24px rgba(255,107,26,.4); color: #fff; text-decoration: none; }
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .55rem 1.3rem;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: .95rem; font-weight: 600;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    text-decoration: none;
}
.btn-secondary:hover { border-color: var(--orange-500); background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }

.btn-danger {
    background: linear-gradient(135deg, #991b1b, #ef4444);
    border: none; border-radius: var(--radius-sm);
    padding: .55rem 1.3rem;
    color: #fff; font-family: 'Rajdhani',sans-serif; font-weight:600; font-size:.95rem;
    cursor: pointer; transition: opacity .2s;
}
.btn-danger:hover { opacity: .85; }

.btn-full { width: 100%; }
.btn-sm   { padding: .35rem .8rem; font-size: .85rem; }

/* ============================================================
   GAME LAYOUT (sidebar + main)
   ============================================================ */
.game-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    grid-template-rows: var(--topbar-h) 1fr;
    min-height: 100vh;
}

/* Topbar */
.topbar {
    grid-column: 1 / -1;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.topbar-logo {
    display: flex; align-items: center; gap: .6rem;
    font-family: 'Rajdhani', sans-serif; font-size: 1.25rem; font-weight: 700;
    color: var(--orange-500); text-shadow: 0 0 12px var(--orange-glow);
    min-width: calc(var(--sidebar-w) - 1.25rem);
}
.topbar-logo .kanji { font-size: 1.6rem; }

.topbar-ryous {
    display: flex; align-items: center; gap: .4rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 999px; padding: .3rem .8rem;
    font-size: .85rem; color: #eab308;
}
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

/* Sidebar */
.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow-y: auto;
    position: sticky;
    top: var(--topbar-h);
    height: calc(100vh - var(--topbar-h));
}

.sidebar-char {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}
.sidebar-char .char-name {
    font-family: 'Rajdhani',sans-serif; font-size: 1.1rem; font-weight: 700;
    color: var(--text-primary); margin-bottom: .2rem;
}
.mini-bars { display: flex; flex-direction: column; gap: .35rem; margin-top: .6rem; }
.mini-bar-wrap { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--text-secondary); }
.mini-bar-wrap .lbl { width: 14px; text-align: center; }
.mini-bar { flex: 1; height: 5px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.mini-bar .fill { height: 100%; border-radius: inherit; transition: width .4s; }
.mini-bar .fill.hp      { background: linear-gradient(90deg, var(--hp-start), var(--hp-end)); }
.mini-bar .fill.chakra  { background: linear-gradient(90deg, var(--chakra-start), var(--chakra-end)); }
.mini-bar .fill.stamina { background: linear-gradient(90deg, var(--stamina-start), var(--stamina-end)); }
.mini-bar .fill.xp      { background: linear-gradient(90deg, var(--xp-start), var(--xp-end)); }

.nav-links { list-style: none; padding: .5rem 0; flex: 1; }
.nav-links li a {
    display: flex; align-items: center; gap: .65rem;
    padding: .6rem 1rem;
    color: var(--text-secondary);
    font-size: .9rem; font-weight: 500;
    transition: background .15s, color .15s, border-left-color .15s;
    border-left: 3px solid transparent;
}
.nav-links li a:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; border-left-color: var(--border); }
.nav-links li a.active { background: rgba(255,107,26,.08); color: var(--orange-400); border-left-color: var(--orange-500); }
.nav-links li a .nav-icon { font-size: 1rem; width: 18px; text-align: center; }
.nav-links li a .nav-badge {
    margin-left: auto; background: var(--orange-500);
    color: #fff; border-radius: 999px; padding: .05rem .45rem; font-size: .72rem; font-weight: 700;
}

.sidebar-footer {
    padding: .75rem 1rem;
    border-top: 1px solid var(--border);
}
.sidebar-logout {
    display: flex; align-items: center; gap: .5rem;
    color: var(--text-muted); font-size: .85rem; padding: .4rem;
}
.sidebar-logout:hover { color: #ef4444; text-decoration: none; }

/* Main Content */
.main-content {
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100vh - var(--topbar-h));
}

.page-header { margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.5rem; color: var(--text-primary); }
.page-header p  { color: var(--text-secondary); font-size: .9rem; margin-top: .25rem; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    transition: border-color .2s;
}
.card:hover { border-color: rgba(255,107,26,.2); }
.card-title {
    font-family: 'Rajdhani',sans-serif;
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .85rem;
    display: flex; align-items: center; gap: .5rem;
}
.card-title::after { content:''; flex:1; height:1px; background: var(--border); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }

/* ============================================================
   RESOURCE BARS (grandes)
   ============================================================ */
.resource-bar-wrap { margin-bottom: .85rem; }
.resource-bar-label {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: .3rem;
    font-size: .8rem; color: var(--text-secondary);
}
.resource-bar-label .val { font-weight: 600; color: var(--text-primary); font-size: .85rem; }
.resource-bar {
    height: 9px; border-radius: 999px;
    background: var(--bg-hover); overflow: hidden;
}
.resource-bar .fill { height: 100%; border-radius: inherit; transition: width .5s; }

/* ============================================================
   STAT GRID (ficha do personagem)
   ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.stat-item {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .55rem .85rem;
}
.stat-name  { font-size: .82rem; color: var(--text-secondary); }
.stat-num   { font-family:'Rajdhani',sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--orange-400); }

/* ============================================================
   RANK BADGES
   ============================================================ */
.rank-badge {
    display: inline-flex; align-items: center;
    padding: .15rem .6rem;
    border-radius: 999px;
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
}
.rank-estudante { background: rgba(107,114,128,.2); color: var(--rank-estudante); border: 1px solid rgba(107,114,128,.3); }
.rank-genin     { background: rgba(34,197,94,.12);  color: var(--rank-genin);     border: 1px solid rgba(34,197,94,.3);  }
.rank-chunin    { background: rgba(59,130,246,.12); color: var(--rank-chunin);    border: 1px solid rgba(59,130,246,.3); }
.rank-jonin     { background: rgba(168,85,247,.12); color: var(--rank-jonin);     border: 1px solid rgba(168,85,247,.3); }
.rank-anbu      { background: rgba(239,68,68,.12);  color: var(--rank-anbu);      border: 1px solid rgba(239,68,68,.3);  }
.rank-sannin    { background: rgba(249,115,22,.12); color: var(--rank-sannin);    border: 1px solid rgba(249,115,22,.3); }

/* ============================================================
   JUTSU CARDS
   ============================================================ */
.jutsu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .75rem; }
.jutsu-card {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .85rem;
    cursor: pointer;
    transition: border-color .2s;
}
.jutsu-card:hover { border-color: var(--orange-500); }
.jutsu-card.selected { border-color: var(--orange-500); background: rgba(255,107,26,.08); box-shadow: 0 0 10px var(--orange-glow); }
.jutsu-name { font-family:'Rajdhani',sans-serif; font-size: 1rem; font-weight: 700; margin-bottom: .4rem; }
.jutsu-meta { display: flex; flex-wrap: wrap; gap: .35rem; font-size: .75rem; }
.jutsu-cost { display: flex; align-items: center; gap: .25rem; color: var(--text-secondary); }
.jutsu-type-tag {
    display: inline-block; padding: .1rem .45rem; border-radius: 999px;
    font-size: .7rem; font-weight: 600; text-transform: uppercase;
}
.type-ninjutsu  { background: rgba(99,102,241,.2);  color: #818cf8; }
.type-genjutsu  { background: rgba(168,85,247,.2);  color: #c084fc; }
.type-taijutsu  { background: rgba(239,68,68,.2);   color: #f87171; }
.type-elemental { background: rgba(34,197,94,.2);   color: #4ade80; }
.type-clan      { background: rgba(255,107,26,.2);  color: var(--orange-400); }
.type-medico    { background: rgba(236,72,153,.2);  color: #f472b6; }

/* ============================================================
   BATTLE
   ============================================================ */
.battle-arena {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 1rem;
    align-items: start;
}
.battle-vs {
    display: flex; align-items: center; justify-content: center;
    font-family: 'Rajdhani',sans-serif;
    font-size: 2rem; font-weight: 700;
    color: var(--orange-500); opacity: .6;
    padding-top: 3rem;
}
.fighter-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.fighter-name { font-family:'Rajdhani',sans-serif; font-size: 1.3rem; font-weight: 700; margin-bottom: .75rem; }
.fighter-atk  { color: var(--orange-400); }
.fighter-def  { color: #60a5fa; }

.battle-actions {
    display: flex; flex-wrap: wrap; gap: .65rem;
    margin-top: 1rem;
}

.battle-log {
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    max-height: 320px;
    overflow-y: auto;
    display: flex; flex-direction: column; gap: .4rem;
    margin-top: 1rem;
}
.log-entry {
    font-size: .85rem; padding: .4rem .6rem;
    border-radius: 4px;
    border-left: 3px solid transparent;
}
.log-atk  { border-left-color: var(--orange-500); background: rgba(255,107,26,.06); }
.log-def  { border-left-color: #3b82f6; background: rgba(59,130,246,.06); }
.log-effect { border-left-color: #a855f7; background: rgba(168,85,247,.06); }
.log-crit { font-weight: 700; color: #fbbf24; }

/* Damage float animation */
.dmg-float {
    position: absolute;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.5rem; font-weight: 700;
    color: #ef4444; pointer-events: none;
    animation: dmg-rise .9s ease-out forwards;
}
.dmg-float.crit { font-size: 2rem; color: #fbbf24; text-shadow: 0 0 12px rgba(251,191,36,.5); }
@keyframes dmg-rise {
    0%   { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-50px); }
}
.shake-anim { animation: shake .35s ease; }
@keyframes shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-8px); }
    75%      { transform: translateX(8px); }
}

/* ============================================================
   CLAN CARDS
   ============================================================ */
.clan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem; }
.clan-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.1rem;
    transition: border-color .2s, transform .2s;
}
.clan-card:hover { border-color: var(--border-glow); transform: translateY(-2px); }
.clan-name   { font-family:'Rajdhani',sans-serif; font-size: 1.2rem; font-weight: 700; margin-bottom: .4rem; }
.clan-desc   { font-size: .82rem; color: var(--text-secondary); margin-bottom: .8rem; }
.clan-bonus  { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .75rem; }
.bonus-tag   { background: var(--bg-hover); border: 1px solid var(--border); border-radius: 4px; padding: .15rem .45rem; font-size: .75rem; color: var(--orange-300); }
.special-box { background: rgba(255,107,26,.06); border: 1px solid rgba(255,107,26,.2); border-radius: var(--radius-sm); padding: .6rem .8rem; margin-bottom: .75rem; }
.special-name{ font-size: .82rem; font-weight: 700; color: var(--orange-400); margin-bottom: .2rem; }
.special-desc{ font-size: .78rem; color: var(--text-secondary); }

/* ============================================================
   ELEMENT CARDS
   ============================================================ */
.element-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .85rem; }
.element-card {
    background: var(--bg-card); border: 2px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem;
    text-align: center;
    transition: border-color .2s, transform .2s;
    cursor: pointer;
}
.element-card:hover { transform: translateY(-3px); }
.element-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.element-name { font-family:'Rajdhani',sans-serif; font-size: 1.2rem; font-weight: 700; }
.element-relations { font-size: .78rem; color: var(--text-secondary); margin-top: .5rem; }

/* ============================================================
   MISSION LIST
   ============================================================ */
.mission-list { display: flex; flex-direction: column; gap: .65rem; }
.mission-item {
    display: flex; align-items: center; gap: 1rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: .85rem 1rem;
    transition: border-color .2s;
}
.mission-item:hover { border-color: rgba(255,107,26,.2); }
.mission-rank-tag {
    width: 28px; height: 28px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family:'Rajdhani',sans-serif; font-weight: 700; font-size: .9rem;
    flex-shrink: 0;
}
.rank-D { background: rgba(107,114,128,.2); color: #9ca3af; }
.rank-C { background: rgba(34,197,94,.15);  color: #4ade80; }
.rank-B { background: rgba(59,130,246,.15); color: #60a5fa; }
.rank-A { background: rgba(239,68,68,.15);  color: #f87171; }

.mission-info { flex: 1; }
.mission-name { font-weight: 600; font-size: .95rem; }
.mission-meta { font-size: .78rem; color: var(--text-secondary); margin-top: .15rem; }

.mission-timer {
    background: var(--bg-card); border: 1px solid var(--orange-500);
    border-radius: var(--radius); padding: 1.25rem;
    text-align: center; margin-bottom: 1.25rem;
    box-shadow: 0 0 20px var(--orange-glow);
}
.timer-display {
    font-family: 'Rajdhani', sans-serif; font-size: 3rem; font-weight: 700;
    color: var(--orange-400); letter-spacing: .1em;
}

/* ============================================================
   RANKING TABLE
   ============================================================ */
.ranking-table { width: 100%; border-collapse: collapse; }
.ranking-table th {
    text-align: left; padding: .6rem .85rem;
    font-size: .78rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1px solid var(--border);
}
.ranking-table td {
    padding: .7rem .85rem;
    border-bottom: 1px solid rgba(34,34,47,.5);
    font-size: .88rem;
}
.ranking-table tr:hover td { background: var(--bg-hover); }
.rank-pos { font-family:'Rajdhani',sans-serif; font-size: 1.1rem; font-weight: 700; }
.rank-pos.top1 { color: #fbbf24; }
.rank-pos.top2 { color: #9ca3af; }
.rank-pos.top3 { color: #d97706; }

/* ============================================================
   NPC / PVP LIST
   ============================================================ */
.opponent-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .85rem; }
.opponent-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.1rem;
    display: flex; flex-direction: column; gap: .65rem;
    transition: border-color .2s;
}
.opponent-card:hover { border-color: rgba(255,107,26,.3); }
.opp-name  { font-family:'Rajdhani',sans-serif; font-size: 1.15rem; font-weight: 700; }
.opp-meta  { font-size: .8rem; color: var(--text-secondary); }
.opp-stats { display: flex; gap: .65rem; flex-wrap: wrap; }
.opp-stat  { font-size: .78rem; color: var(--text-muted); }

/* ============================================================
   TRAINING PAGE
   ============================================================ */
.attr-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.attr-card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 1rem;
    display: flex; flex-direction: column; gap: .65rem;
}
.attr-header { display: flex; align-items: center; justify-content: space-between; }
.attr-name { font-family:'Rajdhani',sans-serif; font-size: 1rem; font-weight: 700; }
.attr-val  { font-family:'Rajdhani',sans-serif; font-size: 1.6rem; font-weight: 700; color: var(--orange-400); }
.attr-cost { font-size: .75rem; color: var(--text-muted); }

.daily-bar-wrap {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.daily-label { display: flex; justify-content: space-between; font-size: .85rem; color: var(--text-secondary); margin-bottom: .5rem; }
.daily-bar { height: 8px; border-radius: 999px; background: var(--bg-hover); overflow: hidden; }
.daily-fill { height: 100%; background: linear-gradient(90deg,#d4520e,#ff6b1a); border-radius:inherit; transition: width .4s; }

/* ============================================================
   ADMIN
   ============================================================ */
.admin-wrapper { display: grid; grid-template-columns: 200px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg-surface); border-right: 1px solid var(--border); padding: 1.25rem 0; }
.admin-logo { padding: .75rem 1.25rem 1.25rem; font-family:'Rajdhani',sans-serif; font-size: 1.2rem; font-weight:700; color: var(--orange-500); border-bottom: 1px solid var(--border); margin-bottom: .5rem; }
.admin-nav a { display: block; padding: .6rem 1.25rem; color: var(--text-secondary); font-size: .9rem; transition: background .15s, color .15s; }
.admin-nav a:hover { background: var(--bg-hover); color: var(--text-primary); text-decoration: none; }
.admin-nav a.active { color: var(--orange-400); background: rgba(255,107,26,.08); }
.admin-main { padding: 1.5rem; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.admin-topbar h1 { font-family:'Rajdhani',sans-serif; font-size: 1.6rem; font-weight: 700; }
.admin-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.metric-num  { font-family:'Rajdhani',sans-serif; font-size: 2.25rem; font-weight: 700; color: var(--orange-400); }
.metric-label{ font-size: .82rem; color: var(--text-secondary); margin-top: .2rem; }

/* ============================================================
   TABLE SHARED
   ============================================================ */
.table-wrapper { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: .6rem .85rem; font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .65rem .85rem; border-bottom: 1px solid rgba(34,34,47,.5); font-size: .88rem; }
.data-table tr:hover td { background: var(--bg-hover); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.75); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 16px; padding: 2rem;
    max-width: 440px; width: 90%;
    transform: scale(.95);
    transition: transform .25s;
    box-shadow: 0 0 40px rgba(0,0,0,.5);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal h3 { font-family:'Rajdhani',sans-serif; font-size: 1.4rem; margin-bottom: 1rem; }

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted    { color: var(--text-secondary); }
.text-orange   { color: var(--orange-400); }
.text-success  { color: #22c55e; }
.text-danger   { color: #ef4444; }
.text-center   { text-align: center; }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.flex  { display: flex; }
.items-center { align-items: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.ml-auto { margin-left: auto; }
.hidden { display: none !important; }
.relative { position: relative; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #333345; }

/* ============================================================
   RESPONSIVIDADE
   ============================================================ */
@media (max-width: 768px) {
    .game-wrapper { grid-template-columns: 1fr; grid-template-rows: var(--topbar-h) 1fr; }
    .sidebar { display: none; position: fixed; top: var(--topbar-h); left: 0; width: 240px; height: calc(100vh - var(--topbar-h)); z-index: 200; transform: translateX(-100%); transition: transform .3s; }
    .sidebar.open { display: flex; transform: translateX(0); }
    .main-content { grid-column: 1; padding: 1rem; }
    .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }
    .attr-grid { grid-template-columns: 1fr; }
    .battle-arena { grid-template-columns: 1fr; }
    .battle-vs { display: none; }
    .admin-wrapper { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-metrics { grid-template-columns: repeat(2,1fr); }
    .class-cards { grid-template-columns: 1fr; }
}
