@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --gold: #f59e0b;
    --green: #16a34a;
    --red: #dc2626;
    --purple: #7c3aed;
    --cyan: #0891b2;
    --shadow: 0 12px 30px rgba(15, 23, 42, .08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28%),
        radial-gradient(circle at top right, rgba(245, 158, 11, .14), transparent 25%),
        var(--bg);
    color: var(--text);
}

.container {
    width: min(980px, 92%);
    margin: 28px auto;
}

.container.narrow {
    width: min(520px, 92%);
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.card.compact {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

h1, h2, h3 {
    margin-top: 0;
    letter-spacing: -0.03em;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 17px;
}

.logo-title {
    text-align: center;
    margin-bottom: 18px;
}

.logo-mark {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, var(--primary), var(--purple));
    color: #fff;
    font-size: 30px;
    box-shadow: 0 12px 26px rgba(37, 99, 235, .25);
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--text);
    outline: none;
    font-size: 14px;
    transition: .18s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

textarea {
    min-height: 88px;
    resize: vertical;
}

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 14px;
    margin-top: 12px;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: .18s ease;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
}

.btn.secondary, button.secondary {
    background: #e2e8f0;
    color: var(--text);
}

.btn.secondary:hover, button.secondary:hover {
    background: #cbd5e1;
}

.btn.gold {
    background: var(--gold);
}

.btn.purple {
    background: var(--purple);
}

.btn.cyan {
    background: var(--cyan);
}

.btn.danger {
    background: var(--red);
}

.btn.success, button.success {
    background: var(--green);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
}

.menu-wrap {
    max-width: 760px;
    margin: 0 auto;
}

.menu-btn {
    min-height: 112px;
    text-align: center;
    padding: 18px 14px;
    font-size: 15px;
    flex-direction: column;
    border-radius: 18px;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.menu-btn:hover {
    background: #f8fafc;
}

.menu-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: #fff;
    margin-bottom: 4px;
}

.bg-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.bg-gold { background: linear-gradient(135deg, #f59e0b, #fbbf24); }
.bg-green { background: linear-gradient(135deg, #16a34a, #4ade80); }
.bg-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.bg-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }

.alert {
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert.ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.alert.err {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    align-items: center;
    margin-bottom: 18px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.item-destaque {
    border: 2px solid var(--gold);
    box-shadow: 0 14px 36px rgba(245, 158, 11, .18);
}

.small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.item-card {
    position: relative;
    overflow: hidden;
}

.item-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--gold), var(--green));
}

.filter-card {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 700px) {
    .topbar {
        display: block;
    }

    .actions {
        margin-top: 10px;
    }

    .container {
        margin-top: 18px;
    }
}


/* Ajustes do menu principal */
.menu-btn {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding-top: 16px;
    gap: 7px;
    font-weight: 800;
}

.menu-icon {
    margin: 0 auto 6px auto;
    flex: 0 0 auto;
}

.menu-btn .small {
    display: block;
    text-align: center;
    font-weight: 600;
}

/* Módulo de metas */
.center-card {
    text-align: center;
}

.footer-actions {
    display: flex;
    justify-content: center;
    margin: 2px auto 18px;
}

.metas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.meta-card {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    text-align: center;
}

.meta-card h3 {
    margin: 8px 0 10px;
}

.meta-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    margin: 0 auto 8px;
    font-size: 24px;
    font-weight: 900;
}

.meta-pendente {
    background: linear-gradient(135deg, rgba(37,99,235,.10), rgba(245,158,11,.12));
    border-color: rgba(37,99,235,.25);
}

.meta-pendente .meta-icon {
    background: linear-gradient(135deg, #2563eb, #f59e0b);
    color: #fff;
}

.meta-atingida {
    background: #f1f5f9;
    color: #64748b;
    filter: grayscale(1);
}

.meta-atingida .meta-icon,
.gray-box .meta-icon {
    background: #cbd5e1;
    color: #475569;
}

.badge.gray {
    background: #e2e8f0;
    color: #475569;
}

.meta-empty {
    background: #f8fafc;
}


/* Agenda do Clan */
.eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.evento-card {
    border-radius: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    text-align: center;
}

.evento-card h3 {
    margin: 8px 0 10px;
}

.evento-futuro {
    background: linear-gradient(135deg, rgba(8,145,178,.10), rgba(37,99,235,.12));
    border-color: rgba(8,145,178,.25);
}

.evento-futuro .meta-icon {
    background: linear-gradient(135deg, #0891b2, #2563eb);
    color: #fff;
}

.evento-realizado {
    background: #f1f5f9;
    color: #64748b;
    filter: grayscale(1);
}

.evento-realizado .meta-icon {
    background: #cbd5e1;
    color: #475569;
}

.center-actions {
    justify-content: center;
}

.center-actions form {
    display: inline-flex;
}


/* Logo central no menu */
.menu-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 6px auto 22px;
}

.menu-logo {
    max-width: 420px;
    width: min(80%, 420px);
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .10);
}


/* Ícones das classes */
.classe-inline,
.char-inline,
.classe-preview {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    vertical-align: middle;
}

.classe-inline img,
.char-inline img,
.classe-preview img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
}

.classe-preview {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    font-weight: 700;
}
