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

:root {
    --void: #04060d;
    --deep: #080e1a;
    --bg: #04060d;
    --bg-soft: #080e1a;
    --panel: rgba(10, 18, 32, 0.88);
    --panel-2: rgba(8, 14, 26, 0.96);
    --panel-3: #0c1525;
    --surface-soft: rgba(10, 18, 32, 0.72);
    --surface-strong: rgba(10, 18, 32, 0.92);
    --line: rgba(0, 255, 224, 0.14);
    --line-strong: rgba(0, 255, 224, 0.38);
    --border-soft: rgba(0, 255, 224, 0.14);
    --border-hover: rgba(0, 255, 224, 0.38);
    --text: #cde8ff;
    --muted: #7898b7;
    --muted-2: #5f7fa0;
    --primary: #00ffe0;
    --primary-strong: #37fff0;
    --accent: #ff6b35;
    --accent-2: #f5c842;
    --success: #4ade80;
    --error: #ff8c8c;
    --warning: #f5c842;
    --shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
    --neon-glow: rgba(0, 255, 224, 0.55);
    --fire-glow: rgba(255, 107, 53, 0.38);
    --radius-xl: 22px;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --font-title: 'Oxanium', 'Rajdhani', sans-serif;
    --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    font-family: var(--font-body);
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 28%),
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.10), transparent 24%),
        linear-gradient(180deg, #070b16 0%, #0b1020 45%, #0a0f1d 100%);
    color: var(--text);
    scrollbar-color: rgba(96, 165, 250, 0.45) rgba(15, 23, 42, 0.35);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.35);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.42);
    border-radius: 999px;
    border: 2px solid rgba(15, 23, 42, 0.65);
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.62);
}

a {
    color: #7dd3fc;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    margin-top: 0;
    text-wrap: balance;
}

.hidden {
    display: none !important;
}

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

.success {
    color: var(--success);
    font-weight: 600;
}

.error {
    color: var(--error);
    font-weight: 600;
}

.mini-label,
.page-kicker,
.guilds-card-label,
.overview-stat .label,
.tracking-label,
.card-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
    color: var(--muted-2);
    font-weight: 900;
    opacity: 0.9;
}

.section-icon {
    opacity: 0.88;
    margin-right: 8px;
}

/* =========================================================
   LAYOUT BASE
   ========================================================= */

.dashboard-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
}

.main-area {
    padding: 28px;
    min-width: 0;
    overflow-x: hidden;
}

.page-shell {
    max-width: 1540px;
    margin: 0 auto;
    min-width: 0;
    padding-bottom: 96px;
}

.page-header-legacy {
    margin-bottom: 24px;
}

.page-header-legacy h1 {
    margin: 0;
    font-size: 32px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.page-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 18px;
    padding: 22px;
    margin-bottom: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(139, 92, 246, 0.08)),
        rgba(15, 23, 42, 0.64);
    box-shadow: var(--shadow);
}

.page-header-modern h1 {
    font-size: clamp(28px, 3vw, 40px);
}

.page-header-modern p,
.card-subtitle,
.guilds-hero p {
    font-size: 14px;
    line-height: 1.55;
}

.page-header-guild {
    max-width: 360px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.14);
    color: #dbeafe;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layout {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.stack {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.page-shell,
.stack,
.card {
    min-width: 0;
}

@media (min-width: 1181px) {
    .layout:not(.editor-layout):not(.config-layout) {
        grid-template-columns: minmax(0, 1fr) 360px;
    }
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    padding: 22px 18px;
    background:
        radial-gradient(circle at top left, rgba(96, 165, 250, 0.10), transparent 34%),
        rgba(7, 12, 24, 0.96);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    gap: 18px;
    backdrop-filter: blur(14px);
}

.sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(96, 165, 250, .18), transparent);
}

.sidebar-top,
.sidebar-nav,
.sidebar-bottom {
    display: grid;
}

.sidebar-top {
    gap: 14px;
}

.sidebar-nav {
    gap: 8px;
}

.sidebar-bottom {
    margin-top: auto;
    gap: 12px;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(139, 92, 246, 0.22));
    border: 1px solid var(--line-strong);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.20);
    font-weight: 800;
    font-size: 20px;
}

.brand-title,
.brand-text strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.back-link,
.logout-link,
.sidebar-bottom .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.78);
    color: var(--text);
    font-weight: 600;
    transition: 0.18s ease;
}

.back-link:hover,
.logout-link:hover {
    transform: translateY(-1px);
    background: rgba(20, 31, 56, 0.95);
    border-color: rgba(96, 165, 250, 0.42);
}

.guild-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(18, 25, 44, 0.94), rgba(14, 20, 36, 0.96));
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 14px;
    backdrop-filter: blur(10px);
}

.guild-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 36%);
    pointer-events: none;
}

.guild-card > * {
    position: relative;
    z-index: 1;
}

.guild-icon-side,
.guild-placeholder-side {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    flex-shrink: 0;
}

.guild-icon-side {
    object-fit: cover;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: #0b1220;
}

.guild-placeholder-side {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(139, 92, 246, 0.16)), #111827;
    border: 1px solid rgba(96, 165, 250, 0.24);
    color: #dbeafe;
    font-size: 24px;
    font-weight: 800;
}

.guild-card-meta h2 {
    margin: 0 0 6px 0;
    font-size: 20px;
    line-height: 1.1;
    word-break: break-word;
}

.guild-card-meta p {
    margin: 0;
    color: var(--muted);
    word-break: break-word;
}

.nav-item {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 50px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid transparent;
    color: #dbeafe;
    user-select: none;
    transition: 0.18s ease;
}

.nav-item::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: .18s ease;
    background: linear-gradient(90deg, rgba(96, 165, 250, .08), transparent);
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(139, 92, 246, 0.12)), rgba(15, 23, 42, 0.82);
    border-color: rgba(96, 165, 250, 0.28);
}

.nav-item:hover {
    transform: translateX(2px);
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 1;
}

.nav-item.active {
    box-shadow: inset 3px 0 0 rgba(96, 165, 250, 0.95);
}

.nav-icon {
    width: 22px;
    text-align: center;
}

.user-box {
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
}

.user-name {
    font-weight: 700;
}

.user-id {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

/* =========================================================
   SHARED UI / CARDS / LISTS
   ========================================================= */

.card,
.overview-stat,
.config-summary-card,
.quick-action-card,
.template-card,
.event-card,
.tracking-card-horizontal,
.guilds-card {
    border-color: var(--border-soft);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    transition: 0.18s ease;
}

.card,
.guilds-card,
.overview-stat,
.template-card,
.event-card,
.tracking-card-horizontal {
    position: relative;
    isolation: isolate;
}

.card::before,
.guilds-card::before,
.template-card::before,
.event-card::before,
.tracking-card-horizontal::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 25%);
    z-index: 0;
}

.card > *,
.guilds-card > *,
.template-card > *,
.event-card > *,
.tracking-card-horizontal > * {
    position: relative;
    z-index: 1;
}

.card {
    overflow: hidden;
    padding: 22px;
    background: linear-gradient(180deg, rgba(18, 25, 44, 0.94), rgba(14, 20, 36, 0.96));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.card:hover,
.overview-stat:hover,
.config-summary-card:hover,
.quick-action-card:hover,
.template-card:hover,
.event-card:hover,
.tracking-card-horizontal:hover,
.guilds-card:hover {
    border-color: var(--border-hover);
}

.card > * + * {
    margin-top: 10px;
}

.card-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    min-height: 54px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.card-header::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, rgba(96, 165, 250, .18), rgba(96, 165, 250, .05), transparent);
}

.card-header + * {
    margin-top: 18px;
}

.card-header > div {
    min-width: 0;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    word-break: break-word;
}

.card-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.card-subtitle {
    color: #9ca3af;
    margin-top: 4px;
}

.card-header .badge,
.card-header > span,
.guilds-section-header > span {
    flex-shrink: 0;
}

.badge,
.card-header > span,
.guilds-section-header > span,
.guilds-badge,
.guilds-tags span,
.tracking-badge,
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 11px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.92));
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 6px 18px rgba(0, 0, 0, .12);
}

.badge-success,
.tracking-badge.success {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.22);
    background: rgba(22, 101, 52, 0.26);
}

.badge-warning,
.tracking-badge.warning {
    color: #fde68a;
    border-color: rgba(245, 158, 11, 0.24);
    background: rgba(120, 53, 15, 0.30);
}

.badge-danger,
.tracking-badge.danger {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.24);
    background: rgba(127, 29, 29, 0.30);
}

.scroll-panel {
    min-height: 260px;
    max-height: 440px;
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-gutter: stable;
}

.list,
.info-list {
    display: grid;
    gap: 14px;
}

.item,
.info-row {
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.92), rgba(10, 15, 28, 0.98));
}

.item {
    transition: 0.18s ease;
}

.item:hover,
.list .item:hover {
    border-color: var(--border-hover);
    background: rgba(15, 23, 42, 0.70);
    transform: translateY(-1px);
}

.item-title,
.item h3,
.template-card h3,
.event-card h3 {
    font-size: 17px;
}

.info-row p,
.item p,
.template-card p,
.event-card p {
    margin: 8px 0;
    color: var(--muted);
    line-height: 1.55;
}

.empty,
.empty-box,
.empty-state,
.empty-state-card,
.discord-preview-empty,
.guilds-empty,
.list-empty {
    border: 1px dashed rgba(96, 165, 250, 0.24);
    border-radius: 18px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
    background: radial-gradient(circle at top, rgba(96, 165, 250, 0.08), transparent 42%), rgba(8, 13, 24, 0.52);
}

.empty-state-title,
.empty-state-card h3,
.empty h3,
.empty-state h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state-text {
    color: #94a3b8;
}

/* =========================================================
   FORMS / BUTTONS
   ========================================================= */

form {
    gap: 14px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 2px;
    color: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
}

input,
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(10, 15, 28, 0.92));
    color: var(--text);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: rgba(96, 165, 250, 0.34);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.72);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.13);
}

input::placeholder,
textarea::placeholder {
    color: rgba(156, 163, 175, 0.72);
}

textarea {
    min-height: 130px;
    resize: vertical;
    line-height: 1.45;
}

select,
select:hover,
select:focus {
    background: #0b1220 !important;
    color: #f8fafc !important;
    border-color: rgba(96, 165, 250, 0.32) !important;
    color-scheme: dark;
    cursor: pointer;
}

select option,
select optgroup {
    background: #0b1220 !important;
    color: #f8fafc !important;
}

select option:checked,
select option:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
}

input[type="checkbox"],
input[type="radio"] {
    width: auto;
    min-height: auto;
}

button,
.btn,
.btn-primary,
.btn-primary-inline,
.btn-danger-inline,
button[type="submit"],
button[type="button"],
.guilds-action {
    min-height: 44px;
    margin-top: 14px;
    padding: 11px 15px;
    border: none;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-weight: 900;
    letter-spacing: -0.01em;
    transition: 0.18s ease;
    user-select: none;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

button,
.btn-primary,
.btn-primary-inline,
button[type="submit"] {
    background: linear-gradient(135deg, var(--primary-strong), var(--accent));
}

button:hover,
.btn:hover,
.btn-primary:hover,
.btn-primary-inline:hover,
.btn-danger-inline:hover,
.guilds-action:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

button:active,
.btn:active,
.btn-primary:active,
.btn-primary-inline:active,
.btn-danger-inline:active,
.guilds-action:active,
.quick-action-card:active,
.nav-item:active {
    transform: translateY(1px) scale(0.99);
}

button[disabled],
.btn[disabled],
.btn-primary[disabled],
.btn-primary-inline[disabled],
.btn-danger-inline[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
    filter: grayscale(0.25);
}

button[type="submit"],
.btn-primary,
.btn-primary-inline {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::after,
.btn-primary::after,
.btn-primary-inline::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
    transform: translateX(-120%);
    transition: .35s ease;
}

button[type="submit"]:hover::after,
.btn-primary:hover::after,
.btn-primary-inline:hover::after {
    transform: translateX(120%);
}

.secondary-btn {
    background: linear-gradient(135deg, #334155, #475569);
}

.danger-btn,
.btn-danger-inline {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.form-field,
.field,
.input-group {
    display: grid;
    gap: 8px;
}

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

.form-actions,
.card-actions,
.template-actions,
.event-actions,
.tracking-actions {
    gap: 10px;
    flex-wrap: wrap;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.help-text,
.form-help,
.small-muted {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

#configResult,
#eventResult,
#templateResult,
#trackingResult {
    min-height: 22px;
    margin: 4px 0 0;
    font-weight: 800;
}

#eventResult:not(:empty),
#templateResult:not(:empty),
#configResult:not(:empty),
#trackingResult:not(:empty) {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(96, 165, 250, 0.18);
}

/* =========================================================
   OVERVIEW / CONFIG SUMMARY
   ========================================================= */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.overview-grid-polished {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.overview-stat {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(18, 25, 44, 0.94), rgba(14, 20, 36, 0.96));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.overview-stat::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.10), transparent 38%);
    pointer-events: none;
}

.overview-grid-polished .overview-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 138px;
    isolation: isolate;
}

.overview-grid-polished .overview-stat::after {
    content: "";
    position: absolute;
    right: -38px;
    bottom: -38px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(96, 165, 250, 0.045);
    z-index: 0;
}

.overview-stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.74);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .04);
}

.overview-stat-blue .overview-stat-icon { background: rgba(59, 130, 246, 0.14); }
.overview-stat-purple .overview-stat-icon { background: rgba(139, 92, 246, 0.14); }
.overview-stat-orange .overview-stat-icon { background: rgba(245, 158, 11, 0.14); }
.overview-stat-green .overview-stat-icon { background: rgba(34, 197, 94, 0.14); }

.overview-stat .label {
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
    color: #93c5fd;
}

.overview-stat .value {
    position: relative;
    z-index: 1;
    margin-top: 4px;
    font-size: clamp(28px, 3vw, 36px);
    font-weight: 900;
    line-height: 1;
}

.overview-stat .value-text {
    font-size: 19px;
    line-height: 1.25;
    word-break: break-word;
}

.config-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.config-summary-card {
    min-height: 94px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.92), rgba(10, 15, 28, 0.98));
    min-width: 0;
}

.config-summary-label,
.config-summary-card .label {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #93c5fd;
    margin-bottom: 8px;
}

.config-summary-value {
    font-size: 17px;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.35;
    word-break: break-word;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.quick-action-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    align-items: center;
    min-height: 92px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.92), rgba(10, 15, 28, 0.98));
    color: var(--text);
    user-select: none;
}

.quick-action-card:hover {
    transform: translateY(-1px);
}

.quick-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.20), rgba(139, 92, 246, 0.18));
    border: 1px solid rgba(96, 165, 250, 0.16);
}

.quick-action-title,
.quick-action-card strong {
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
}

.quick-action-text,
.quick-action-card span {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.45;
}

.top-creators-card {
    position: relative;
    overflow: hidden;
}

.top-creators-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top right, rgba(250, 204, 21, 0.14), transparent 34%),
        radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.12), transparent 30%);
    pointer-events: none;
}

.top-creators-card > * {
    position: relative;
    z-index: 1;
}

.top-creators-list {
    display: grid;
    gap: 12px;
}

.top-creator-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(12, 18, 32, 0.92), rgba(10, 15, 28, 0.98));
    transition: 0.18s ease;
}

.top-creator-row.rank-1 {
    border-color: rgba(250, 204, 21, 0.55);
    box-shadow: 0 0 22px rgba(250, 204, 21, 0.08);
    background:
        radial-gradient(circle at left, rgba(250, 204, 21, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(12, 18, 32, 0.96), rgba(10, 15, 28, 0.98));
}

.top-creator-avatar-wrap,
.top-creator-medal {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(15, 23, 42, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

.top-creator-avatar-wrap {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.9), rgba(59, 130, 246, 0.45));
    overflow: hidden;
}

.top-creator-avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.top-creator-medal {
    font-size: 26px;
}

.top-creator-name {
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 4px;
    word-break: break-word;
}

.top-creator-row.rank-1 .top-creator-name {
    font-size: 17px;
}

.top-creator-total {
    text-align: right;
    min-width: 74px;
}

.top-creator-total strong {
    display: block;
    font-size: 26px;
    line-height: 1;
    color: #f8fafc;
}

.top-creator-row.rank-1 .top-creator-total strong {
    color: #facc15;
}

.top-creator-total span {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
}

.empty-top-creators {
    border: 1px dashed rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    padding: 16px;
    color: var(--muted);
    background: rgba(15, 23, 42, 0.42);
}

/* =========================================================
   TEMPLATES / EVENTS / EDITOR
   ========================================================= */

.editor-layout {
    grid-template-columns: minmax(420px, 0.95fr) minmax(460px, 1.05fr);
    gap: 22px;
    align-items: start;
}

.editor-layout > .stack {
    gap: 22px;
}

.editor-layout .card {
    border-radius: 24px;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.055), transparent 36%), rgba(15, 23, 42, 0.78);
}

.editor-layout .card-header {
    align-items: flex-start;
    gap: 14px;
}

.editor-layout .card-header h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.editor-layout .card-subtitle {
    max-width: 640px;
    line-height: 1.45;
}

.editor-layout .scroll-panel {
    min-height: 340px;
    max-height: 540px;
    padding: 4px 8px 4px 2px;
}

.editor-layout form {
    display: grid;
    gap: 12px;
}

.editor-layout input,
.editor-layout select,
.editor-layout textarea,
.config-layout input,
.config-layout select,
.tracking-form-grid input,
.tracking-form-grid select {
    min-height: 46px;
    border-radius: 14px;
}

.config-layout select,
.editor-layout select,
.tracking-form-grid select {
    max-height: 46px;
}

.editor-layout textarea {
    min-height: 118px;
}

.editor-layout button[type="submit"],
.config-layout button[type="submit"] {
    margin-top: 8px;
    min-height: 48px;
    border-radius: 15px;
}

.form-header-row {
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px;
    margin: -4px -4px 22px;
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(139, 92, 246, 0.06)), rgba(10, 15, 28, 0.52);
}

.form-header-row::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.10), transparent 34%);
}

.form-header-row > * {
    position: relative;
    z-index: 1;
}

.form-header-row h2 {
    margin-top: 4px;
}

.role-builder {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.12);
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.08), transparent 34%), rgba(15, 23, 42, 0.58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.role-row {
    display: grid;
    grid-template-columns: 88px 1fr 120px auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.11);
    border-radius: 14px;
    background: rgba(11, 18, 32, 0.98);
}

.role-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.emoji-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 16px;
    border: 1px solid rgba(71, 85, 105, 0.78);
    background: rgba(11, 18, 32, 0.98);
    font-size: 24px;
    overflow: hidden;
}

.emoji-preview img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.picker-selected-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(15, 23, 42, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.template-image-thumb {
    width: 100%;
    max-width: 220px;
    border-radius: 14px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    margin-top: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.template-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.template-summary h3 {
    margin-bottom: 6px;
}

.template-description-preview {
    margin: 8px 0 0 0;
    color: #d6deee;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
}

.template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.template-card,
.event-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    min-height: auto;
    padding: 18px;
    border: 1px solid rgba(96, 165, 250, 0.16);
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.06), transparent 34%), rgba(15, 23, 42, 0.62);
}

.template-card:hover,
.event-card:hover {
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.085), transparent 34%), rgba(15, 23, 42, 0.72);
}

.template-card > :first-child,
.event-card > :first-child {
    flex: 1;
    min-width: 0;
}

.template-card h3,
.event-card h3 {
    line-height: 1.25;
    word-break: break-word;
}

.template-card .muted,
.event-card .muted {
    color: #9ca3af;
    font-size: 13px;
}

.template-card strong,
.event-card strong {
    color: #dbeafe;
}

.template-actions,
.event-actions,
.template-card .card-actions,
.event-card .card-actions {
    display: flex;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap !important;
    width: 150px;
    min-width: 110px;
    flex-shrink: 0;
}

.template-actions button,
.event-actions button,
.template-card .card-actions button,
.event-card .card-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px;
    flex: none !important;
    padding: 10px 14px;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.template-actions button:hover,
.event-actions button:hover {
    filter: brightness(1.08);
}

.list.scroll-panel:empty::before {
    content: "Nada carregado por enquanto.";
    display: block;
    padding: 22px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.18);
    color: var(--muted);
    text-align: center;
    background: rgba(15, 23, 42, 0.42);
}

#templateImagePreviewWrap:not(:empty) {
    margin-top: 4px;
    padding: 10px;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.48);
}

.event-card-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.date-time-field {
    position: relative;
}

.date-time-field input {
    padding-right: 44px;
}

.date-time-field input::-webkit-calendar-picker-indicator {
    opacity: 0;
    display: block;
    position: absolute;
    right: 0;
    width: 44px;
    height: 100%;
    cursor: pointer;
}

input[type="date"],
input[type="time"],
.calendar-input {
    color-scheme: dark;
    border-color: rgba(96, 165, 250, 0.42);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.10), rgba(139, 92, 246, 0.10)), rgba(11, 18, 32, 0.95);
}

input[type="date"]::-webkit-inner-spin-button,
input[type="date"]::-webkit-clear-button,
input[type="time"]::-webkit-inner-spin-button,
input[type="time"]::-webkit-clear-button {
    display: none;
}

.date-time-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    pointer-events: none;
    font-size: 15px;
    line-height: 1;
    opacity: 0.95;
}

/* =========================================================
   CONFIG
   ========================================================= */

.config-layout {
    grid-template-columns: minmax(380px, 0.85fr) minmax(520px, 1.15fr);
    gap: 22px;
    align-items: start;
}

.config-layout .card {
    border-radius: 24px;
}

.config-layout .list {
    display: grid;
    gap: 14px;
}

.config-layout .item {
    padding: 18px;
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.06), transparent 36%), rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(148, 163, 184, 0.10);
    transition: 0.18s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.config-layout .item:hover {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.22);
}

.config-layout .item h3 {
    margin-bottom: 12px;
}

.config-layout .item p {
    margin: 8px 0;
    line-height: 1.55;
}

.config-layout .item span[id^="summary"] {
    color: #dbeafe;
    font-weight: 700;
}

.config-layout form {
    display: grid;
    gap: 12px;
}

.alert-banner {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid;
    font-size: 14px;
    line-height: 1.45;
}

.alert-success {
    background: rgba(34, 197, 94, 0.10);
    border-color: rgba(34, 197, 94, 0.35);
    color: #bbf7d0;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.10);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

.alert-error {
    background: rgba(239, 68, 68, 0.10);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fecaca;
}

/* =========================================================
   TRACKING / OBJETIVOS
   ========================================================= */

.tracking-page-stack {
    gap: 22px;
}

.tracking-page-stack > .card {
    border-radius: 24px;
}

.tracking-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tracking-form-grid .form-field {
    display: grid;
    gap: 8px;
}

.tracking-form-grid .form-field-full,
.tracking-form-grid .form-actions {
    grid-column: 1 / -1;
}

.tracking-form-grid .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 80px;
}

.tracking-form-grid .btn-primary-inline {
    min-width: 220px;
}

.tracking-scroll-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-inline: -4px;
    padding-bottom: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    scrollbar-width: thin;
    scroll-behavior: smooth;
    display: block;
}

.tracking-scroll-row {
    display: inline-flex;
    gap: 18px;
    width: auto;
    min-width: 100%;
    padding: 4px 4px 8px;
    vertical-align: top;
}

.tracking-card,
.tracking-card-horizontal {
    background: #171a22;
    border: 1px solid #2b3140;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tracking-card-horizontal {
    flex: 0 0 320px;
    width: 320px;
    min-width: 360px;
    max-width: 430px;
    border-radius: 22px;
    background: radial-gradient(circle at top right, rgba(34, 211, 238, 0.08), transparent 36%), rgba(15, 23, 42, 0.78);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.tracking-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.tracking-title {
    font-size: 19px;
    font-weight: 700;
    color: #f8fafc;
}

.tracking-subtitle {
    margin-top: 4px;
    color: #9ca3af;
    font-size: 14px;
}

.tracking-badge {
    white-space: nowrap;
}

.tracking-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tracking-detail {
    padding: 12px;
    border-radius: 16px;
    background: rgba(8, 13, 24, 0.46);
    border: 1px solid rgba(148, 163, 184, 0.08);
    line-height: 1.55;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.tracking-label {
    display: block;
    margin-bottom: 5px;
    color: #94a3b8;
}

.tracking-detail strong,
.tracking-detail span:last-child {
    word-break: break-word;
}

.tracking-card-horizontal .tracking-actions {
    margin-top: auto;
}

/* =========================================================
   DISCORD PREVIEW
   ========================================================= */

.discord-preview-shell {
    display: grid;
    gap: 12px;
    justify-items: center;
    place-items: start;
    min-height: 260px;
    padding: 18px;
    border-radius: 20px;
    border: 1px dashed rgba(96, 165, 250, 0.22);
    background: radial-gradient(circle at top, rgba(88, 101, 242, 0.10), transparent 42%), rgba(8, 13, 24, 0.56);
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
}

.discord-preview-shell::before {
    content: "Pré-visualização";
    display: block;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.discord-preview-shell > * {
    width: 100%;
}

.discord-preview-message {
    display: grid;
    gap: 10px;
}

.discord-preview-mention {
    font-size: 13px;
    color: #cbd5e1;
    word-break: break-word;
}

.discord-preview-mention code {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.12);
    padding: 2px 6px;
    border-radius: 8px;
    color: #e2e8f0;
}

.discord-preview-embed,
.embed-preview,
.discord-embed-preview,
.preview-card {
    border-radius: 18px;
    background: rgba(8, 13, 24, 0.66);
    border: 1px solid rgba(88, 101, 242, 0.18);
    max-width: 100%;
}

.discord-preview-embed {
    display: grid;
    grid-template-columns: 4px 1fr;
    overflow: hidden;
    background: rgba(49, 51, 56, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.10);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.discord-preview-bar {
    background: #5865f2;
    min-height: 100%;
}

.discord-preview-body {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}

.discord-preview-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
}

.discord-preview-description {
    font-size: 14px;
    line-height: 1.45;
    color: #dcddde;
    white-space: normal;
    word-break: break-word;
}

.discord-preview-meta-row,
.discord-preview-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.discord-preview-single-row {
    display: block;
}

.discord-preview-meta-item,
.discord-preview-field {
    min-width: 0;
}

.discord-preview-meta-label,
.discord-preview-field-title {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
    line-height: 1.2;
    word-break: break-word;
}

.discord-preview-meta-value,
.discord-preview-field-value {
    font-size: 13px;
    color: #dcddde;
    word-break: break-word;
    line-height: 1.35;
}

.discord-preview-inline-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    vertical-align: middle;
}

.discord-preview-inline-emoji img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
}

.discord-preview-image-wrap {
    margin-top: 4px;
}

.discord-preview-image,
.embed-preview img,
.discord-embed-preview img,
.preview-card img {
    display: block;
    width: 100%;
    max-width: 360px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.72);
}

.discord-preview-footer {
    font-size: 12px;
    color: #a3a6aa;
    border-top: 1px solid rgba(148, 163, 184, 0.08);
    padding-top: 10px;
}

/* =========================================================
   GUILDS PAGE
   ========================================================= */

.guilds-page {
    padding: 24px;
}

.guilds-shell {
    width: min(1380px, 96vw);
    margin: 0 auto;
    padding-bottom: 96px;
}

.guilds-hero {
    position: relative;
    overflow: hidden;
    margin-top: 4px;
    margin-bottom: 28px;
    padding: 26px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.13), rgba(139, 92, 246, 0.11)), rgba(10, 15, 28, 0.94);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.guilds-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at top right, rgba(34, 211, 238, 0.10), transparent 32%),
        repeating-linear-gradient(90deg, transparent 0, transparent 78px, rgba(148, 163, 184, 0.04) 79px, transparent 80px);
}

.guilds-hero-top,
.guilds-hero-content {
    position: relative;
    z-index: 1;
}

.guilds-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.guilds-badge {
    padding: 8px 14px;
    font-size: 13px;
}

.guilds-logout {
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: rgba(15, 23, 42, 0.82);
    color: var(--text);
    font-weight: 700;
    transition: 0.18s ease;
}

.guilds-logout:hover {
    transform: translateY(-1px);
    background: rgba(20, 31, 56, 0.96);
}

.guilds-hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.guilds-hero-content h1 {
    margin: 0 0 10px;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.guilds-hero-content p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.guilds-hero-pills,
.guilds-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guilds-hero-pills span {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.guilds-section {
    margin-top: 28px;
}

.guilds-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.guilds-section-header h2 {
    margin: 0 0 6px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.guilds-section-header p {
    margin: 0;
    color: #9ca3af;
    font-size: 14px;
}

.guilds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.guilds-card {
    overflow: hidden;
    min-height: 260px;
    padding: 18px;
    background: linear-gradient(180deg, rgba(18, 25, 44, 0.95), rgba(14, 20, 36, 0.98));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.guilds-card::before {
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 35%);
}

.guilds-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .28), 0 0 0 1px rgba(96, 165, 250, .06);
}

.guilds-card-active {
    border-color: rgba(74, 222, 128, 0.22);
}

.guilds-card-main {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    min-height: 138px;
}

.guilds-icon,
.guilds-icon-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
    transition: .18s ease;
}

.guilds-card:hover .guilds-icon,
.guilds-card:hover .guilds-icon-placeholder {
    transform: scale(1.03);
}

.guilds-icon {
    object-fit: cover;
    border: 1px solid rgba(96, 165, 250, 0.28);
    background: #0b1220;
}

.guilds-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(139, 92, 246, 0.18)), #111827;
    border: 1px solid rgba(96, 165, 250, 0.24);
    color: #dbeafe;
    font-size: 24px;
    font-weight: 900;
}

.guilds-card-content {
    min-width: 0;
}

.guilds-card-label {
    margin-bottom: 7px;
}

.guilds-card-label-warning {
    color: var(--warning);
}

.guilds-card h3 {
    margin: 0 0 8px;
    font-size: 21px;
    line-height: 1.2;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.guilds-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.guilds-tags {
    gap: 8px;
    margin-top: 14px;
}

.guilds-tags span {
    padding: 5px 9px;
    font-size: 12px;
    color: #bfdbfe;
}

.guilds-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 46px;
    margin-top: auto;
    padding: 12px 16px;
    border-radius: 15px;
    color: #fff;
    font-weight: 800;
}

.guilds-action-primary,
.guilds-action-install {
    background: linear-gradient(135deg, var(--primary-strong), var(--accent));
}

.guilds-action-license {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

/* =========================================================
   MODALS / EMOJI / SUBCLASS
   ========================================================= */

.emoji-modal.hidden {
    display: none;
}

.emoji-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.emoji-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
}

.emoji-modal-content {
    position: absolute;
    right: 24px;
    top: 120px;
    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    background: linear-gradient(180deg, rgba(18, 25, 44, 0.98), rgba(12, 18, 32, 0.98));
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.emoji-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
    border-bottom: 1px solid rgba(96, 165, 250, 0.10);
}

.emoji-modal-header h3 {
    margin: 0;
    font-size: 16px;
}

.emoji-modal-search {
    padding: 12px 14px 0;
}

.emoji-modal-body {
    padding: 14px;
    overflow-y: auto;
    max-height: calc(70vh - 90px);
}

.emoji-section {
    margin-top: 14px;
}

.emoji-section:first-child {
    margin-top: 0;
}

.emoji-section h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #cbd5e1;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
}

.emoji-btn {
    height: 42px;
    width: 42px;
    margin-top: 0;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(71, 85, 105, 0.72);
    background: rgba(11, 18, 32, 0.98);
    color: #fff;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.emoji-btn:hover,
.emoji-btn.active {
    border-color: #3b82f6;
    background: rgba(23, 37, 84, 0.95);
    transform: none;
}

.emoji-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.subclass-modal {
    display: flex;
    align-items: center;
    justify-content: center;
}

.subclass-modal .emoji-modal-content {
    width: min(900px, 90vw);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.subclass-modal .emoji-modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
}

/* =========================================================
   PIX
   ========================================================= */

.pix-float-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 999;
    border: none;
    border-radius: 999px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.35);
}

.pix-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
}

.pix-modal.show {
    display: flex;
}

.pix-modal-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(10, 15, 28, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: #fff;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.pix-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
}

.pix-modal-card h2 {
    margin-bottom: 10px;
}

.pix-modal-card p {
    color: #cbd5e1;
    line-height: 1.5;
}

.pix-qrcode {
    width: 210px;
    max-width: 100%;
    margin: 18px auto;
    display: block;
    border-radius: 18px;
    background: #fff;
    padding: 10px;
}

.pix-key-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.pix-key-box span {
    word-break: break-all;
    color: #e2e8f0;
    font-size: 14px;
}

.pix-key-box button {
    border: none;
    border-radius: 12px;
    padding: 12px;
    background: #22c55e;
    color: #052e16;
    font-weight: 800;
    cursor: pointer;
}

/* =========================================================
   TABLES
   ========================================================= */

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border-radius: 18px;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

th {
    color: #dbeafe;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(15, 23, 42, 0.72);
}

td {
    color: var(--muted);
    background: rgba(15, 23, 42, 0.42);
}

tr:last-child td {
    border-bottom: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1180px) {
    .overview-grid,
    .overview-grid-polished {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .config-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .editor-layout,
    .config-layout {
        grid-template-columns: 1fr;
    }

    .editor-layout .scroll-panel {
        max-height: 460px;
    }

    .tracking-card-horizontal {
        min-width: 330px;
    }
}

@media (max-width: 1100px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--line);
    }

    .layout {
        grid-template-columns: 1fr;
    }

    .scroll-panel {
        max-height: 360px;
    }
}

@media (max-width: 980px) {
    .page-shell {
        padding-bottom: 120px;
    }

    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    }

    .sidebar-bottom {
        margin-top: 0;
    }

    .main-area {
        padding: 18px;
    }

    .page-header-modern {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-header-guild {
        max-width: 100%;
    }

    .nav-item:hover {
        transform: none;
    }
}

@media (max-width: 860px) {
    .card-header {
        flex-direction: column;
    }

    .card-actions,
    .template-actions,
    .event-actions,
    .tracking-actions {
        width: 100%;
    }

    .two-cols {
        grid-template-columns: 1fr;
    }

    .guilds-hero-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .guilds-logout {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 780px) {
    .guilds-page {
        padding: 16px;
    }

    .guilds-shell {
        width: 100%;
    }

    .guilds-hero {
        padding: 20px;
    }

    .guilds-grid {
        grid-template-columns: 1fr;
    }

    .guilds-card-main {
        flex-direction: column;
    }

    .guilds-icon,
    .guilds-icon-placeholder {
        width: 68px;
        height: 68px;
    }
}

@media (max-width: 760px) {
    .main-area {
        padding: 16px;
    }

    .two-cols,
    .role-row,
    .picker-selected-row,
    .overview-grid,
    .overview-grid-polished,
    .discord-preview-meta-row,
    .discord-preview-fields-grid,
    .tracking-form-grid,
    .tracking-details,
    .config-summary-grid {
        grid-template-columns: 1fr;
    }

    .template-summary,
    .event-card-top,
    .form-header-row,
    .tracking-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .template-card,
    .event-card {
        flex-direction: column;
    }

    .template-actions,
    .event-actions,
    .template-card .card-actions,
    .event-card .card-actions {
        width: 100%;
    }

    .quick-action-card {
        grid-template-columns: 1fr;
    }

    .emoji-modal-content {
        right: 16px;
        left: 16px;
        width: auto;
        top: 90px;
        max-width: unset;
    }

    .page-header-legacy h1 {
        font-size: 26px;
    }

    .discord-preview-embed,
    .discord-preview-image {
        max-width: 100%;
    }

    .card-header {
        min-height: auto;
    }

    .badge,
    .card-header > span,
    .guilds-section-header > span,
    .guilds-badge,
    .tracking-badge {
        white-space: normal;
        text-align: center;
    }

    .pix-float-btn {
        right: 16px;
        bottom: 16px;
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 720px) {
    .tracking-card-horizontal {
        flex: 0 0 280px;
        width: 280px;
        min-width: 300px;
    }
}

@media (max-width: 700px) {
    .tracking-form-grid .form-actions {
        justify-content: stretch;
    }

    .tracking-form-grid .btn-primary-inline {
        width: 100%;
        min-width: 0;
    }

    .card-header h2 {
        font-size: 20px;
    }

    .overview-stat .value {
        font-size: 30px;
    }

    .card > * + * {
        margin-top: 8px;
    }

    .discord-preview-shell {
        min-height: 200px;
    }

    textarea {
        min-height: 110px;
    }
}

@media (max-width: 640px) {
    .card {
        padding: 18px;
    }

    .page-header-modern,
    .guilds-hero,
    .guilds-card {
        border-radius: 20px;
    }

    .guilds-hero-content h1,
    .page-header-modern h1 {
        font-size: 28px;
    }

    .overview-grid-polished .overview-stat {
        align-items: flex-start;
        min-height: auto;
    }

    .guilds-card {
        min-height: auto;
    }

    .form-header-row {
        padding: 14px;
    }

    .editor-layout .card {
        border-radius: 20px;
    }
}

@media (max-width: 520px) {
    .main-area {
        padding: 14px;
    }

    .overview-stat-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .guilds-hero-pills span {
        width: 100%;
        text-align: center;
    }

    th,
    td {
        padding: 10px;
    }
}


/* =========================================================
   ChroniX Resurrection Skin v50 — Cyber Neon Identity
   Fonte nova: Oxanium nos títulos + Inter no corpo.
   ========================================================= */

html, body {
    background: var(--void) !important;
    color: var(--text);
}

body {
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 255, 224, 0.10), transparent 28%),
        radial-gradient(circle at 90% 100%, rgba(255, 107, 53, 0.10), transparent 26%),
        linear-gradient(180deg, #04060d 0%, #080e1a 48%, #04060d 100%) !important;
}

body.chronix-cyber-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,224,.025) 2px, rgba(0,255,224,.025) 4px);
    opacity: .7;
}

.chronix-bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0,255,224,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,255,224,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    opacity: .75;
}

.chronix-orb { position: fixed; border-radius: 999px; filter: blur(80px); pointer-events: none; z-index: 0; }
.chronix-orb-tl { width: 520px; height: 520px; top: -230px; left: -220px; background: radial-gradient(circle, rgba(0,255,224,.12), transparent 70%); }
.chronix-orb-br { width: 480px; height: 480px; right: -190px; bottom: -190px; background: radial-gradient(circle, rgba(255,107,53,.11), transparent 70%); }

h1, h2, h3, h4,
.brand-title,
.page-kicker,
.mini-label,
.login-label,
.guilds-card-label,
.config-summary-label,
.tracking-label,
.cyber-kicker,
.auth-brand-title {
    font-family: var(--font-title) !important;
    letter-spacing: .02em;
}

.dashboard-shell,
.guilds-shell,
.auth-shell,
.page-shell {
    position: relative;
    z-index: 1;
}

.sidebar {
    background: linear-gradient(180deg, rgba(10,18,32,.96), rgba(5,8,15,.98)) !important;
    border-right: 1px solid var(--line) !important;
    box-shadow: 18px 0 60px rgba(0,0,0,.28);
}

.brand-block { gap: 14px; }
.brand-logo {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(0,255,224,.12), rgba(255,107,53,.08)) !important;
    border: 1px solid var(--line-strong) !important;
    box-shadow: 0 0 24px rgba(0,255,224,.14), inset 0 0 18px rgba(0,255,224,.08) !important;
    display: grid !important;
    place-items: center !important;
    overflow: hidden;
    color: var(--primary) !important;
}
.brand-logo img { width: 42px; height: 42px; object-fit: contain; display: block; }
.brand-title { color: #fff !important; font-weight: 800 !important; text-transform: uppercase; }
.brand-subtitle { color: var(--primary) !important; }

.main-area { background: transparent !important; }
.page-shell { max-width: 1440px; }
.page-header-modern,
.page-header-legacy,
.page-header-guild,
.guilds-hero,
.card,
.admin-card,
.config-summary-card,
.empty-state-card,
.top-creators-card,
.tracking-card,
.quick-action-card,
.role-builder,
.login-box,
.auth-login-box,
.pix-modal-card,
.license-modal-card {
    background: linear-gradient(180deg, rgba(10,18,32,.90), rgba(6,10,18,.94)) !important;
    border: 1px solid var(--line) !important;
    box-shadow: 0 16px 50px rgba(0,0,0,.30), inset 0 1px 0 rgba(255,255,255,.035) !important;
    backdrop-filter: blur(14px);
}
.card,
.admin-card,
.config-summary-card,
.empty-state-card,
.top-creators-card,
.tracking-card,
.quick-action-card,
.role-builder { border-radius: var(--radius-lg) !important; }
.card:hover,
.admin-card:hover,
.quick-action-card:hover,
.tracking-card:hover,
.guilds-card:hover {
    border-color: var(--line-strong) !important;
    box-shadow: 0 18px 60px rgba(0,0,0,.34), 0 0 28px rgba(0,255,224,.08) !important;
}
.page-kicker,
.mini-label,
.guilds-card-label,
.tracking-label,
.config-summary-label,
.login-label,
.cyber-kicker {
    color: var(--primary) !important;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: 12px;
}

.nav-item,
.back-link,
.logout-link,
.guilds-logout,
.secondary-btn,
.admin-button,
.btn,
.guilds-action,
.pix-key-box button,
.danger-btn,
.btn-primary-inline,
.btn-danger-inline {
    border-radius: 10px !important;
    font-family: var(--font-title) !important;
    font-weight: 700 !important;
    letter-spacing: .03em;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}
.nav-item {
    color: var(--muted) !important;
    border: 1px solid transparent !important;
}
.nav-item:hover,
.nav-item.active {
    background: rgba(0,255,224,.075) !important;
    border-color: var(--line) !important;
    color: var(--primary) !important;
    box-shadow: 0 0 18px rgba(0,255,224,.08);
}
.nav-icon { filter: drop-shadow(0 0 6px rgba(0,255,224,.22)); }

.btn,
.btn-primary-inline,
.admin-button.primary,
.guilds-action-primary,
.guilds-action-install,
.btn-discord-neon {
    background: linear-gradient(90deg, rgba(0,255,224,.92), rgba(55,255,240,.86)) !important;
    color: #041014 !important;
    border: 1px solid rgba(0,255,224,.70) !important;
    box-shadow: 0 0 28px rgba(0,255,224,.18) !important;
}
.btn:hover,
.btn-primary-inline:hover,
.admin-button.primary:hover,
.guilds-action-primary:hover,
.guilds-action-install:hover,
.btn-discord-neon:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 36px rgba(0,255,224,.32) !important;
}
.secondary-btn,
.admin-button,
.back-link,
.guilds-logout,
.logout-link {
    background: rgba(0,255,224,.055) !important;
    color: var(--primary) !important;
    border: 1px solid var(--line) !important;
}
.danger,
.danger-btn,
.btn-danger-inline,
.admin-button.danger,
.guilds-action-license {
    background: rgba(255,107,53,.12) !important;
    color: #ffb092 !important;
    border: 1px solid rgba(255,107,53,.32) !important;
}

input, textarea, select,
.calendar-input,
.emoji-modal-search,
.license-input {
    background: rgba(0,0,0,.30) !important;
    border: 1px solid var(--line) !important;
    color: var(--text) !important;
    border-radius: 10px !important;
    outline: none !important;
}
input:focus, textarea:focus, select:focus,
.calendar-input:focus,
.emoji-modal-search:focus,
.license-input:focus {
    border-color: var(--line-strong) !important;
    box-shadow: 0 0 0 3px rgba(0,255,224,.08), 0 0 24px rgba(0,255,224,.10) !important;
}
label { color: #9fc6dc !important; }

.pill,
.stat-pill,
.guilds-hero-pills span,
.guilds-tags span,
.badge,
.tracking-badge {
    background: rgba(0,255,224,.07) !important;
    border: 1px solid var(--line) !important;
    color: var(--primary) !important;
    border-radius: 999px !important;
}
.badge-ok { background: rgba(74,222,128,.12) !important; color: #86efac !important; border-color: rgba(74,222,128,.28) !important; }
.badge-off, .alert-error { background: rgba(255,107,53,.12) !important; color: #ffb092 !important; border-color: rgba(255,107,53,.32) !important; }

.admin-grid,
.overview-grid,
.overview-grid-polished,
.quick-actions-grid,
.config-summary-grid,
.guilds-grid,
.hero-grid,
.auth-feature-grid { gap: 16px !important; }
.admin-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
    border: 1px solid var(--line) !important;
    background: rgba(0,0,0,.20) !important;
}
.admin-table th {
    background: rgba(0,255,224,.06) !important;
    color: var(--primary) !important;
    font-family: var(--font-title);
    text-transform: uppercase;
    letter-spacing: .08em;
}
.admin-table td,
.admin-table th { border-bottom: 1px solid rgba(0,255,224,.08) !important; }

.guild-card {
    background: rgba(0,255,224,.045) !important;
    border: 1px solid var(--line) !important;
}
.guild-placeholder-side,
.guilds-icon-placeholder,
.guild-placeholder,
.top-creator-avatar,
.overview-stat-icon {
    background: linear-gradient(135deg, rgba(0,255,224,.16), rgba(255,107,53,.10)) !important;
    border: 1px solid var(--line) !important;
    color: var(--primary) !important;
}
.guilds-page { min-height: 100vh; padding: 36px 20px; }
.guilds-shell { max-width: 1220px; margin: 0 auto; }
.guilds-badge { display: inline-flex; align-items: center; gap: 10px; }
.guilds-badge img { width: 26px; height: 26px; object-fit: contain; }
.guilds-card {
    background: linear-gradient(180deg, rgba(10,18,32,.90), rgba(6,10,18,.94)) !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
}
.guilds-card-active { box-shadow: inset 3px 0 0 rgba(0,255,224,.75), 0 16px 50px rgba(0,0,0,.26) !important; }

.discord-preview-shell,
.discord-preview-message,
.discord-preview-embed,
.emoji-modal-content,
.subclass-modal,
.scroll-panel {
    background: rgba(0,0,0,.28) !important;
    border-color: var(--line) !important;
}
.discord-preview-embed { border-left-color: var(--primary) !important; }
.discord-preview-title { color: #ffffff !important; }
.discord-preview-footer,
.discord-preview-description,
.discord-preview-field-value { color: #a7c7dd !important; }

.pix-float-btn {
    background: linear-gradient(90deg, rgba(255,107,53,.92), rgba(245,200,66,.90)) !important;
    color: #160802 !important;
    border: 1px solid rgba(245,200,66,.45) !important;
    box-shadow: 0 12px 38px rgba(255,107,53,.22) !important;
    font-family: var(--font-title) !important;
}
.pix-modal { backdrop-filter: blur(8px); }
.pix-key-box { background: rgba(0,0,0,.28) !important; border: 1px solid rgba(255,107,53,.22) !important; }

/* Login reconstruído */
.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 30px;
}
.auth-shell {
    width: min(1180px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: 1fr 440px;
    border: 1px solid var(--line);
    background: rgba(4,6,13,.35);
    box-shadow: 0 24px 90px rgba(0,0,0,.38);
    overflow: hidden;
    border-radius: 20px;
}
.auth-hero-panel,
.auth-login-panel {
    position: relative;
    padding: 48px;
}
.auth-hero-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-right: 1px solid var(--line);
    background: linear-gradient(135deg, rgba(0,255,224,.055), transparent 52%);
}
.auth-brand-row { display: flex; align-items: center; gap: 18px; }
.auth-logo-frame {
    width: 82px;
    height: 82px;
    border-radius: 22px;
    border: 1px solid var(--line-strong);
    background: rgba(0,0,0,.22);
    display: grid;
    place-items: center;
    box-shadow: 0 0 32px rgba(0,255,224,.12);
}
.auth-logo-frame img { width: 60px; height: 60px; object-fit: contain; }
.auth-brand-title { font-size: 38px; line-height: 1; color: #fff; font-weight: 800; text-transform: uppercase; }
.auth-brand-subtitle { margin-top: 5px; color: var(--primary); text-transform: uppercase; letter-spacing: .18em; font-size: 12px; }
.auth-headline h1 { color: #fff; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; margin: 14px 0 18px; }
.auth-headline h1 span { color: var(--primary); text-shadow: 0 0 24px rgba(0,255,224,.35); }
.auth-headline p { color: var(--muted); max-width: 620px; line-height: 1.75; font-size: 17px; }
.auth-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.cyber-feature-card { padding: 18px; border: 1px solid var(--line); background: rgba(10,18,32,.72); border-radius: 14px; }
.cyber-feature-icon { font-size: 22px; margin-bottom: 10px; }
.cyber-feature-card strong { display: block; color: #fff; font-family: var(--font-title); margin-bottom: 6px; }
.cyber-feature-card p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }
.cyber-pill-row { display: flex; gap: 10px; flex-wrap: wrap; }
.cyber-pill-row span { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); background: rgba(0,255,224,.055); color: var(--primary); border-radius: 999px; font-family: var(--font-title); font-size: 12px; }
.cyber-pill-row i { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 8px var(--neon-glow); }
.auth-login-panel { background: linear-gradient(170deg, rgba(10,18,32,.96), rgba(5,8,15,.98)); display: flex; flex-direction: column; justify-content: center; }
.auth-login-panel h2 { font-size: 34px; line-height: 1.08; color: #fff; margin: 16px 0 12px; }
.auth-login-panel > p { color: var(--muted); line-height: 1.65; margin-bottom: 26px; }
.auth-steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 12px; }
.auth-steps li { display: flex; gap: 12px; color: #9fbfd5; line-height: 1.45; }
.auth-steps span { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 28px; border: 1px solid var(--primary); color: var(--primary); border-radius: 7px; font-family: var(--font-title); font-size: 12px; }
.btn-discord-neon { width: 100%; display: flex; justify-content: center; padding: 16px 18px !important; text-transform: uppercase; }
.auth-safe-note { text-align: center; margin-top: 12px; color: var(--muted-2); font-size: 12px; }
.auth-note { margin-top: 18px; border-left: 2px solid var(--primary); background: rgba(0,255,224,.075); padding: 14px 16px; color: #9fbfd5; line-height: 1.55; border-radius: 0 10px 10px 0; }
.cyber-corner { position:absolute; width: 28px; height: 28px; border-color: var(--primary); border-style: solid; opacity:.55; }
.cyber-corner-tl { top: 24px; left: 24px; border-width: 2px 0 0 2px; }
.cyber-corner-tr { top: 24px; right: 24px; border-width: 2px 2px 0 0; }
.cyber-corner-bl { bottom: 24px; left: 24px; border-width: 0 0 2px 2px; }
.cyber-corner-br { bottom: 24px; right: 24px; border-width: 0 2px 2px 0; }

.license-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.68); z-index:9999; align-items:center; justify-content:center; padding:20px; backdrop-filter: blur(8px); }
.license-modal-card { padding:24px; width:min(560px,92vw); border-radius:18px; }
.license-input { width:100%; box-sizing:border-box; padding:14px; margin-top:8px; font-size:15px; }
.license-modal-actions { display:flex; gap:10px; margin-top:16px; justify-content:flex-end; flex-wrap:wrap; }

@media (max-width: 980px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-hero-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .auth-feature-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .auth-page { padding: 16px; }
    .auth-hero-panel, .auth-login-panel { padding: 28px; }
    .auth-brand-row { align-items: flex-start; flex-direction: column; }
    .auth-shell { border-radius: 16px; }
    .guilds-page { padding: 18px 12px; }
}
