@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;800&family=Fira+Code:wght@400;500&display=swap');

:root {
    --bg-dark: #0a0e17;
    --bg-card: #151a28;
    --primary: #00f2fe;
    --primary-hover: #4facfe;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --border-color: #30363d;
    --danger: #ff4757;
    --success: #2ed573;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
}

/* Layout Principal Dividido */
.main-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Lado Esquerdo - Hero */
.hero-section {
    flex: 1.2;
    background: linear-gradient(135deg, rgba(10,14,23,0.9), rgba(10,14,23,0.9)), url('https://images.unsplash.com/photo-1555066931-4365d14bab8c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-right: 1px solid var(--border-color);
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero-content h1 span {
    color: var(--primary);
    text-shadow: 0 0 20px rgba(0, 242, 254, 0.4);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    line-height: 1.6;
}

/* Acesso Rápido */
.quick-access-box {
    background: rgba(21, 26, 40, 0.8);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(0, 242, 254, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.quick-access-box h3 {
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.input-group {
    display: flex;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.input-group .prefix {
    padding: 15px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-family: 'Fira Code', monospace;
    border-right: 1px solid var(--border-color);
}

.input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px;
    color: var(--text-main);
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    outline: none;
}

.input-group .btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

.input-group .btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary);
}

/* Lado Direito - Autenticação */
.auth-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: var(--bg-dark);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Formulários */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-control {
    margin-bottom: 20px;
}

.form-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.input-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon i {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.input-icon input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
}

.input-icon input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-submit:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.3);
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: rgba(255, 71, 87, 0.1);
    color: var(--danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.alert-success {
    background: rgba(46, 213, 115, 0.1);
    color: var(--success);
    border: 1px solid rgba(46, 213, 115, 0.3);
}

/* Responsividade */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
    }
    .hero-section {
        padding: 40px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
}

/* --- ADIÇÕES PARA O DASHBOARD --- */

.dashboard-body {
    background-color: #0d1117;
    display: block; /* Diferente do login que era flex center */
}

.dash-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-small {
    font-size: 1.8rem;
    font-weight: 800;
    text-decoration: none;
    color: #fff;
}

.logo-small span { color: var(--primary); }

.user-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-logout {
    color: var(--danger);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px 15px;
    border: 1px solid rgba(255, 71, 87, 0.3);
    border-radius: 6px;
    transition: 0.3s;
}

.btn-logout:hover {
    background: var(--danger);
    color: #fff;
}

.dash-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- TABS DASHBOARD --- */
.dash-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    overflow-x: auto;
}

.dash-tab-btn {
    background: transparent;
    color: var(--text-muted);
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.dash-tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.dash-tab-btn.active {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.dash-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dash-tab-content.active {
    display: block;
}

/* Barra de Criação no Dash */
.create-bar {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    margin-bottom: 40px;
}

.create-bar h2 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-align: left;
    color: var(--primary);
}

.mt-10 { margin-top: 10px; }

/* Grid de Cards */
.pads-list h3 {
    margin-bottom: 20px;
    text-align: left;
    color: var(--text-muted);
}

.pads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.pad-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: 0.3s;
}

.pad-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.pad-icon {
    width: 50px;
    height: 50px;
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
}

.pad-details { flex: 1; }

.pad-details h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: #fff;
}

.tag-public { color: var(--success); font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }
.tag-private { color: var(--danger); font-size: 0.8rem; font-weight: bold; text-transform: uppercase; }

.pad-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-action.view { background: rgba(255, 255, 255, 0.1); color: #fff; }
.btn-action.edit { background: rgba(0, 242, 254, 0.1); color: var(--primary); }
.btn-action.delete { background: rgba(255, 71, 87, 0.1); color: var(--danger); }

.btn-action:hover { filter: brightness(1.3); }

.empty-state {
    text-align: center;
    padding: 60px;
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    color: var(--text-muted);
}

/* --- ADIÇÕES PARA O EDITOR (PAD.PHP) --- */

.editor-body {
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden; /* Remove scroll do body, deixa só no editor */
}

/* Header do Editor */
.editor-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.editor-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-back {
    color: var(--text-muted);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    transition: 0.2s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pad-title-info h2 {
    color: var(--primary);
    font-size: 1.2rem;
    margin: 0;
}

.pad-author {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.editor-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.save-feedback {
    color: var(--success);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
    0% { opacity: 1; }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

.btn-copy {
    background: rgba(0, 242, 254, 0.1);
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
}

.btn-copy:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

/* Botão Salvar Específico do Editor */
.btn-save {
    background: var(--primary);
    color: #000;
    border: 1px solid var(--primary);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 15px var(--primary);
}

/* Área Principal */
.editor-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.editor-form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.editor-toolbar {
    background-color: rgba(21, 26, 40, 0.5);
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

/* Toggle Switch para Privacidade */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    background-color: #30363d;
    border-radius: 34px;
    transition: .4s;
    margin-right: 10px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(22px);
    background-color: #000;
}

.toggle-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Textarea / Leitura */
.code-editor, .readonly-container {
    flex: 1;
    width: 100%;
    padding: 20px;
    background-color: var(--bg-dark);
    color: #e6edf3;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    font-size: 15px;
    line-height: 1.6;
    border: none;
    resize: none;
    outline: none;
}

.readonly-container {
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--success);
    color: #000;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.not-found-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* --- MODAIS CUSTOMIZADOS --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.modal-icon.error { color: var(--danger); text-shadow: 0 0 15px rgba(255, 71, 87, 0.4); }
.modal-icon.warning { color: #f1c40f; text-shadow: 0 0 15px rgba(241, 196, 15, 0.4); }

.modal-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.modal-text {
    color: var(--text-muted);
    margin-bottom: 30px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-modal {
    padding: 12px 25px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.95rem;
}

.btn-cancel { background: rgba(255,255,255,0.05); color: var(--text-main); border: 1px solid var(--border-color); }
.btn-cancel:hover { background: rgba(255,255,255,0.1); }

.btn-confirm { background: var(--danger); color: #fff; }
.btn-confirm:hover { background: #ff6b81; box-shadow: 0 0 15px var(--danger); }

/* --- RESPONSIVIDADE (MOBILE) --- */

/* Ecrãs médios (Tablets e ecrãs pequenos) */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        min-height: 100vh;
        height: auto;
    }
    
    .hero-section {
        flex: none;
        padding: 50px 20px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        text-align: center;
    }
    
    .hero-content {
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .quick-access-box {
        text-align: left; /* Mantém o formulário alinhado à esquerda dentro da box */
    }
    
    .auth-section {
        flex: none;
        padding: 40px 20px;
        min-height: 500px;
    }
}

/* Ecrãs pequenos (Smartphones) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .quick-access-box {
        padding: 20px;
    }

    /* Reorganiza o formulário de acesso rápido para não vazar a tela */
    .input-group {
        flex-direction: column;
        border: none;
        background: transparent;
        gap: 10px;
    }
    
    .input-group .prefix {
        border-radius: 8px;
        border: 1px solid var(--border-color);
        padding: 12px;
        font-size: 0.85rem;
        text-align: center;
        border-right: 1px solid var(--border-color); /* Força borda no mobile */
    }
    
    /* Encurta o texto do prefixo no mobile se necessário */
    .prefix-text {
        word-break: break-all;
    }
    
    .input-group input {
        border-radius: 8px;
        border: 1px solid var(--border-color);
        background: var(--bg-dark);
        padding: 15px;
        text-align: center; /* Centraliza a digitação no mobile */
    }
    
    .input-group .btn-primary {
        border-radius: 8px;
        padding: 15px;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .auth-card {
        padding: 25px 15px;
    }

    .tabs {
        flex-direction: row; /* Mantém os botões lado a lado */
    }
    
    .tab-btn {
        font-size: 0.9rem;
        padding: 10px;
    }

    .btn-submit {
        padding: 12px;
    }
}

/* --- RESPONSIVIDADE DASHBOARD (MOBILE) --- */
@media (max-width: 768px) {
    /* Ajusta o espaçamento do cabeçalho */
    .dash-header {
        padding: 15px 20px;
    }
    
    /* Empilha a logo e o menu do utilizador */
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Reduz as margens laterais no corpo do painel */
    .dash-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    /* Centraliza os textos na área de criação */
    .create-bar {
        padding: 20px;
        text-align: center;
    }
    
    .create-bar h2 {
        text-align: center;
        font-size: 1.2rem;
    }

    /* Força a grelha de cartões a ter apenas 1 coluna no telemóvel */
    .pads-grid {
        grid-template-columns: 1fr; 
    }

    /* Transforma o cartão horizontal num formato vertical mais limpo */
    .pad-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .pad-details {
        margin: 10px 0;
    }

    /* Move os botões de ação para baixo e separa-os com uma linha */
    .pad-actions {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
        border-top: 1px solid var(--border-color);
        padding-top: 15px;
    }
    
    /* Aumenta ligeiramente os botões para facilitar o toque */
    .btn-action {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* --- BUSCA E FILTROS --- */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    flex: 1;
    max-width: 400px;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: var(--text-muted);
}

.search-wrapper input {
    flex: 1;
    width: 100%;
    padding: 12px 40px 12px 40px; /* Espaço para o ícone da lupa e o x */
    background: transparent;
    border: none;
    color: var(--text-main);
    outline: none;
    font-size: 0.95rem;
}

.clear-search {
    position: absolute;
    right: 90px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 5px;
    transition: 0.2s;
}

.clear-search:hover {
    color: var(--danger);
}

.btn-search {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: none;
    border-left: 1px solid var(--border-color);
    padding: 0 20px;
    height: 100%;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.btn-search:hover {
    background: var(--primary);
    color: #000;
}

/* --- PAGINAÇÃO --- */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.page-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.page-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.page-btn.active {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
}

/* Responsividade da Busca */
@media (max-width: 768px) {
    .list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        max-width: 100%;
    }
}

/* --- ESTILOS ADMIN --- */
.header-left { display: flex; align-items: center; gap: 30px; }

.btn-admin-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 15px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid var(--primary);
    border-radius: 6px;
    transition: 0.3s;
}

.btn-admin-link:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: 16px;
    text-align: center;
}

.stat-card i { font-size: 2rem; color: var(--primary); margin-bottom: 10px; }
.stat-val { font-size: 2.5rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-label { color: var(--text-muted); font-size: 0.9rem; margin-top: 5px; }

.neon-green i { color: var(--success); }
.neon-red i { color: var(--danger); }

.admin-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 900px) { .admin-main-grid { grid-template-columns: 1fr; } }

.admin-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
}

.admin-section h3 { margin-bottom: 20px; color: var(--primary); font-size: 1.1rem; text-align: left; }

/* Tabela Admin */
.admin-table-wrapper { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; text-align: left; }
.admin-table th { color: var(--text-muted); padding: 12px; border-bottom: 1px solid var(--border-color); font-size: 0.85rem; }
.admin-table td { padding: 15px 12px; border-bottom: 1px solid rgba(255,255,255,0.05); color: #fff; font-size: 0.9rem; }

.btn-table { color: var(--primary); background: rgba(0,242,254,0.1); padding: 5px 10px; border-radius: 4px; }

/* Lista Usuários */
.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.user-avatar {
    width: 40px; height: 40px; background: var(--primary); color: #000;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800;
}

.user-info-row { display: flex; flex-direction: column; }
.user-info-row span { font-size: 0.8rem; color: var(--text-muted); }

/* --- ESTILOS ADICIONAIS ADMIN (DASHBOARD) --- */

/* Scroll na Lista de Membros */
.scroll-container {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 10px;
}

/* Customização da Barra de Scroll (Opcional, mas elegante) */
.scroll-container::-webkit-scrollbar {
    width: 6px;
}
.scroll-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}
.scroll-container::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Ações dos Usuários na Lateral (Alinha os botões à direita) */
.user-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.user-info-row {
    flex: 1; /* Permite que o texto ocupe o espaço vazio e empurre os botões */
    overflow: hidden;
}

.user-info-row span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-actions {
    display: flex;
    gap: 5px;
}

.btn-table {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.btn-table.delete { background: rgba(255, 71, 87, 0.1); color: var(--danger); }
.btn-table.delete:hover { background: var(--danger); color: #fff; }

.btn-table.edit { background: rgba(241, 196, 15, 0.1); color: #f1c40f; }
.btn-table.edit:hover { background: #f1c40f; color: #000; }

/* --- CORREÇÃO BUG CURSOR ACE EDITOR --- */
/* Obriga todos os elementos do editor a usar font monospace pura e remove letter-spacing global */
.ace_editor, .ace_editor * {
    font-family: 'Fira Code', 'Courier New', Courier, monospace !important;
    letter-spacing: normal !important;
    transition: none !important;
}