/* ═══════════════════════════════════════════════════════════
   ATLANTIS IA — Command Dashboard Stylesheet
   Dark mode · Black & White · Institutional elegance
   Inspired by sbrp_empresas style, adapted to monochrome
   ═══════════════════════════════════════════════════════════ */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
    --accent:       #FFFFFF;
    --accent-light: #E0E0E0;
    --accent-dim:   #808080;
    --accent-glow:  rgba(255,255,255,0.15);

    --danger:       #FF4444;
    --danger-dim:   #AA2222;

    --bg-deep:      #050507;
    --bg:           #0A0A0E;
    --bg-card:      #0F0F14;
    --bg-elevated:  #141419;
    --bg-hover:     #1A1A20;

    --white:        #F0F0F0;
    --white-dim:    #B0B0B0;
    --gray:         #707070;
    --surface: #1E1E1E;
    --surface-hover: #252525;
    --border: #333333;
    --success:      #50C878;
    --warning:      #FFB347;
    --info:         #6BA3D6;

    --border-subtle:  rgba(255,255,255,0.06);
    --border-mid:     rgba(255,255,255,0.10);
    --border-focus:   rgba(255,255,255,0.30);

    --glass-bg:     rgba(15,15,20,0.90);
    --glass-border: rgba(255,255,255,0.08);
    --glass-blur:   20px;

    --sidebar-w: 250px;

    --font-body:    'Inter', 'Source Serif 4', -apple-system, sans-serif;
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-mono:    'JetBrains Mono', 'Courier New', monospace;

    --radius-sm: 0px;
    --radius-md: 0px;
    --radius-lg: 0px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 8px 32px rgba(0,0,0,0.7);
    --shadow-lg: 0 24px 64px rgba(0,0,0,0.8);
    --shadow-accent: 0 0 40px rgba(255,255,255,0.05);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --duration-fast: 120ms;
    --duration-base: 200ms;
    --duration-slow: 350ms;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 80% 50% at 50% -15%, rgba(255,255,255,0.03) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 90% 90%, rgba(255,255,255,0.015) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(255,255,255,0.012) 79px, rgba(255,255,255,0.012) 80px),
        repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,0.012) 79px, rgba(255,255,255,0.012) 80px);
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gray-dark); }
::-webkit-scrollbar-thumb:hover { background: var(--gray); }

/* ── Glass Card ─────────────────────────────────────────── */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-top: 2px solid rgba(255,255,255,0.15);
}

/* ══════════════════════════════════════════════════════════
   LOGIN SCREEN
   ══════════════════════════════════════════════════════════ */
.screen-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    position: fixed;
    inset: 0;
    z-index: 200;
    background: var(--bg);
}

.login-card {
    text-align: center;
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 90%;
    animation: fadeInUp 0.6s var(--ease-out) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-logo {
    margin-bottom: 1.5rem;
}

.login-logo-icon {
    font-size: 56px;
    filter: grayscale(100%) brightness(1.8);
}

.login-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.login-subtitle {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--gray);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.login-desc {
    font-size: 0.85rem;
    color: var(--white-dim);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.login-error {
    background: rgba(255,68,68,0.08);
    border: 1px solid rgba(255,68,68,0.2);
    color: var(--danger);
    padding: 10px 16px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    margin-bottom: 1.5rem;
    display: none;
}

.login-error.visible { display: block; }

.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--white);
    color: var(--bg);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid var(--white);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease);
}

.btn-discord:hover {
    background: transparent;
    color: var(--white);
    box-shadow: 0 0 30px rgba(255,255,255,0.1);
}

.btn-discord svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: rgba(10,10,14,0.97);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    padding: 20px 14px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-subtle);
}
.perm-item.inherited {
    opacity: 0.6;
}
.perm-item:last-child {
    border-bottom: none;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px 22px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 18px;
}

.logo-icon {
    font-size: 28px;
    filter: grayscale(100%) brightness(2);
}

.logo-title {
    display: block;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}

.logo-sub {
    display: block;
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--gray);
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--white-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: all var(--duration-fast) var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.03);
    color: var(--white);
    border-color: rgba(255,255,255,0.06);
}

.nav-item.active {
    background: rgba(255,255,255,0.06);
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.12);
}

.nav-icon { font-size: 16px; width: 20px; text-align: center; opacity: 0.7; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
    margin-top: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15);
    object-fit: cover;
}

.user-name {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--white);
    font-weight: 500;
}

.user-id {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--gray);
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--gray);
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
    text-align: center;
    text-decoration: none;
}

.btn-logout:hover {
    color: var(--danger);
    border-color: rgba(255,68,68,0.2);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 0;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--gray);
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gray);
    flex-shrink: 0;
    transition: all var(--duration-base) var(--ease);
}

.connection-status.connected .status-dot {
    background: var(--success);
    box-shadow: 0 0 8px rgba(80,200,120,0.5);
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ══════════════════════════════════════════════════════════
   MAIN CONTENT
   ══════════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    padding: 36px 44px;
    position: relative;
    z-index: 1;
}

.content-section { display: none; }
.content-section.active { display: block; animation: fadeIn 0.3s var(--ease-out); }

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Page Header ────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.page-subtitle {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray);
    margin-top: 6px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 140px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid rgba(255,255,255,0.12);
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: all var(--duration-fast) var(--ease);
}

.stat-card:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.035);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ── Loading & Empty States ─────────────────────────────── */
.loading-state, .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    text-align: center;
    color: var(--white-dim);
}

.spinner {
    width: 40px; height: 40px;
    border: 2px solid rgba(255,255,255,0.08);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.empty-icon { font-size: 48px; opacity: 0.3; }
.empty-state h2 { font-family: var(--font-heading); font-size: 20px; font-weight: 700; color: var(--white); }
.empty-state p { font-size: 13px; max-width: 300px; color: var(--gray); line-height: 1.6; }

/* ══════════════════════════════════════════════════════════
   GUILD CARDS GRID
   ══════════════════════════════════════════════════════════ */
.guilds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
}

.guild-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid rgba(255,255,255,0.10);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    cursor: pointer;
    transition: all var(--duration-base) var(--ease);
    position: relative;
    overflow: hidden;
    animation: slideUp var(--duration-slow) var(--ease) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.guild-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(255,255,255,0.03), transparent 70%);
    opacity: 0;
    transition: opacity var(--duration-fast) var(--ease);
}

.guild-card:hover {
    border-color: rgba(255,255,255,0.20);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    transform: translateY(-3px);
}

.guild-card:hover::before { opacity: 1; }

.guild-header {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.guild-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.10);
    object-fit: cover;
    filter: grayscale(30%);
    transition: filter var(--duration-base) var(--ease);
}

.guild-card:hover .guild-icon { filter: grayscale(0%); }

.guild-icon-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--gray);
    font-weight: 700;
}

.guild-meta { flex: 1; min-width: 0; }

.guild-name {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-members {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray);
    margin-top: 3px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.guild-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.badge-commands {
    background: rgba(255,255,255,0.04);
    color: var(--white-dim);
    border: 1px solid rgba(255,255,255,0.10);
}

.badge-active {
    background: rgba(80,200,120,0.08);
    color: var(--success);
    border: 1px solid rgba(80,200,120,0.20);
}

/* ══════════════════════════════════════════════════════════
   GUILD DETAIL VIEW
   ══════════════════════════════════════════════════════════ */
.guild-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.btn-back {
    background: none;
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--white-dim);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all var(--duration-fast) var(--ease);
}

.btn-back:hover {
    border-color: rgba(255,255,255,0.25);
    color: var(--white);
}

.guild-detail-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.12);
    object-fit: cover;
}

.guild-detail-name {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
}

/* ── Commands Management ───────────────────────────────── */
.commands-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 20px;
}

.commands-panel {
    background: rgba(255,255,255,0.015);
    border: 1px solid var(--border-subtle);
    padding: 20px;
    min-height: 300px;
}

.panel-title {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.panel-count {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    padding: 2px 8px;
    font-size: 10px;
    color: var(--white-dim);
}

.commands-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 200px;
}

.commands-list.drop-zone {
    transition: background var(--duration-fast) var(--ease);
}

.commands-list.drop-zone.drag-over {
    background: rgba(255,255,255,0.03);
    border: 1px dashed rgba(255,255,255,0.15);
    margin: -1px;
}

.command-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: grab;
    transition: all var(--duration-fast) var(--ease);
    user-select: none;
}

.command-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.12);
}

.command-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.command-item-icon {
    font-size: 14px;
    opacity: 0.5;
    width: 20px;
    text-align: center;
}

.command-item-name {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    font-weight: 500;
}

.command-item-desc {
    font-size: 11px;
    color: var(--gray);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.command-item-actions {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

.cmd-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--gray);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--duration-fast) var(--ease);
}

.cmd-btn:hover {
    border-color: rgba(255,255,255,0.20);
    color: var(--white);
}

.cmd-btn.cmd-add:hover { color: var(--success); border-color: rgba(80,200,120,0.3); }
.cmd-btn.cmd-remove:hover { color: var(--danger); border-color: rgba(255,68,68,0.3); }
.cmd-btn.cmd-perms:hover { color: var(--info); border-color: rgba(107,163,214,0.3); }

/* ══════════════════════════════════════════════════════════
   PERMISSIONS MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 150;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s var(--ease);
}

.modal-overlay.visible {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-top: 2px solid rgba(255,255,255,0.15);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s var(--ease-out);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-title { font-size: 16px; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--gray); font-size: 18px; cursor: pointer; transition: 0.2s; }
.modal-close:hover { color: var(--white); }

.perm-tabs {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 15px;
    overflow-x: auto;
}
.perm-tab {
    padding: 10px 15px;
    cursor: pointer;
    color: var(--gray);
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    font-size: 13px;
    white-space: nowrap;
}
.perm-tab:hover { color: var(--white); }
.perm-tab.active {
    color: var(--white);
    border-bottom-color: var(--primary);
}

.modal-body { padding: 0 20px 20px; max-height: 400px; overflow-y: auto; flex: 1; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ── Permission Items ──────────────────────────────────── */
.perm-section-title {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 20px;
}

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

.perm-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.perm-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.04);
    transition: all var(--duration-fast) var(--ease);
}

.perm-item:hover {
    background: rgba(255,255,255,0.04);
}

.perm-item-name {
    font-size: 12px;
    color: var(--white);
    flex: 1;
}

.perm-item-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.10);
    flex-shrink: 0;
}

.perm-toggle {
    appearance: none;
    width: 36px;
    height: 20px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: all var(--duration-base) var(--ease);
}

.perm-toggle::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--gray);
    top: 2px;
    left: 2px;
    transition: all var(--duration-base) var(--ease);
}

.perm-toggle:checked {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.30);
}

.perm-toggle:checked::before {
    background: var(--white);
    transform: translateX(16px);
}

/* ══════════════════════════════════════════════════════════
   SAVED CONFIGS
   ══════════════════════════════════════════════════════════ */
.configs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 16px;
}

.config-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-subtle);
    border-top: 2px solid rgba(255,255,255,0.08);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: slideUp var(--duration-slow) var(--ease) both;
}

.config-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
}

.config-date {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray);
    letter-spacing: 0.06em;
}

.config-summary {
    font-size: 12px;
    color: var(--white-dim);
    line-height: 1.5;
}

.config-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
    padding: 9px 18px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease);
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: var(--white-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
    border-color: rgba(255,255,255,0.20);
}

.btn-primary {
    background: var(--white);
    color: var(--bg);
    border-color: var(--white);
}

.btn-primary:hover {
    background: transparent;
    color: var(--white);
}

.btn-danger {
    border-color: rgba(255,68,68,0.20);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(255,68,68,0.10);
    border-color: rgba(255,68,68,0.40);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 9.5px;
}

/* ── Save Config Form ─────────────────────────────────── */
.save-form {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.form-label {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--gray);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.form-input {
    padding: 9px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.10);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 12px;
    transition: all var(--duration-fast) var(--ease);
}

.form-input:focus {
    outline: none;
    border-color: rgba(255,255,255,0.30);
    background: rgba(255,255,255,0.05);
}

.form-input::placeholder { color: var(--gray-dark); }

/* ── Toast Notifications ─────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-mid);
    border-left: 3px solid var(--white);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--white);
    max-width: 380px;
    animation: slideInRight 0.3s var(--ease-out);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error { border-left-color: var(--danger); }
.toast.toast-info { border-left-color: var(--info); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.toast-icon { font-size: 14px; }

/* ══════════════════════════════════════════════════════════
   MOBILE MENU TOGGLE
   ══════════════════════════════════════════════════════════ */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 105;
    width: 38px;
    height: 38px;
    background: rgba(10,10,14,0.95);
    border: 1px solid rgba(255,255,255,0.12);
    color: var(--white);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-close-btn {
    display: none;
    position: absolute;
    top: 16px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--gray);
    font-size: 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.mobile-close-btn:hover { color: var(--white); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — TABLET (≤1024px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .stats-bar { flex-wrap: wrap; }
    .stat-card { min-width: 120px; }
    .guilds-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
    .commands-layout { grid-template-columns: 1fr; }
    .configs-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤768px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    :root { --sidebar-w: 0px; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: 280px;
        z-index: 110;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }

    .mobile-menu-btn { display: flex; }
    .sidebar.open ~ .mobile-menu-btn,
    .mobile-menu-btn.hidden { display: none; }

    .mobile-close-btn { display: flex; }

    .main-content {
        margin-left: 0;
        padding: 60px 16px 24px;
    }

    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-title { font-size: 22px; }
    .page-subtitle { font-size: 10px; }

    .stats-bar { gap: 8px; }
    .stat-card { min-width: 0; flex: 1 1 45%; padding: 14px 16px; }
    .stat-number { font-size: 22px; }

    .guilds-grid { grid-template-columns: 1fr; gap: 14px; }
    .guild-card { padding: 18px; }

    .commands-layout { grid-template-columns: 1fr; gap: 16px; }

    .modal { max-width: 95vw; }
    .modal-body { padding: 18px; }
    .modal-header { padding: 18px; }
    .modal-footer { padding: 14px 18px; }

    .save-form { flex-direction: column; }

    .login-card { padding: 2rem 1.5rem; max-width: 92vw; }
    .login-title { font-size: 1.4rem; }

    .btn { padding: 8px 14px; font-size: 10px; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE — SMALL MOBILE (≤420px)
   ══════════════════════════════════════════════════════════ */
@media (max-width: 420px) {
    .main-content { padding: 56px 12px 20px; }
    .stat-card { flex: 1 1 100%; }
    .page-title { font-size: 20px; }
    .modal { max-width: 100vw; margin: 0; }
    .form-input { font-size: 16px; }
}
