/* --- ESTILOS GENERALES Y FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #1e1e2f;
    --bg-light-dark: #27293d;
    --primary: #4a43ec;
    --gradient: linear-gradient(90deg, #4a43ec, #8a43f5);
    --text-light: #f0f0f0;
    --text-muted: #a0a0b0;
    --border-color: #3a3b5a;
    --success: #03ac13;
    --danger: #d62828;
    --warning: #ffa500;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-light);
}

/* --- ESTILOS PÁGINA DE LOGIN --- */
.login-body {
    background-color: var(--bg-dark);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-image: radial-gradient(circle at top right, rgba(74, 67, 236, 0.3), transparent 40%),
                      radial-gradient(circle at bottom left, rgba(138, 67, 245, 0.3), transparent 40%);
}

.login-container { width: 100%; max-width: 380px; }
.login-form { background-color: var(--bg-light-dark); padding: 40px; border-radius: 12px; border: 1px solid var(--border-color); text-align: center; }
.login-form h2 { font-size: 24px; margin-bottom: 30px; letter-spacing: 1px; }
.login-form .input-group { position: relative; margin-bottom: 25px; }
.login-form .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.error-message { color: #ff8080; margin-bottom: 15px; font-size: 14px; }


/* --- ESTILOS DEL DASHBOARD --- */
.dashboard-body {
    background-color: var(--bg-dark);
    display: flex;
}

/* --- BARRA LATERAL --- */
.sidebar { width: 260px; background-color: var(--bg-light-dark); height: 100vh; display: flex; flex-direction: column; padding: 20px 0; border-right: 1px solid var(--border-color); }
.sidebar-header { padding: 0 25px 20px 25px; font-size: 22px; border-bottom: 1px solid var(--border-color); }
.sidebar-menu { list-style: none; padding: 20px; flex-grow: 1; }
.sidebar-menu li a { display: flex; align-items: center; gap: 15px; padding: 15px; text-decoration: none; color: var(--text-muted); border-radius: 8px; margin-bottom: 5px; transition: background-color 0.3s, color 0.3s; }
.sidebar-menu li a:hover { background-color: var(--bg-dark); color: var(--text-light); }
.sidebar-menu li a.active { background-image: var(--gradient); color: white; }
.sidebar-menu li a .fa-solid, .sidebar-menu li a .fa-regular { font-size: 18px; width: 20px; text-align: center; }
.sidebar-footer { padding: 20px; border-top: 1px solid var(--border-color); }
.sidebar-footer a { text-decoration: none; color: var(--text-muted); display: flex; align-items: center; gap: 15px; padding: 10px; border-radius: 8px; }
.sidebar-footer a:hover { background-color: var(--bg-dark); }

/* --- CONTENIDO PRINCIPAL --- */
.main-content { flex-grow: 1; padding: 40px; overflow-y: auto; height: 100vh; }
.main-header { margin-bottom: 30px; }
.main-header h1 { font-size: 32px; }
.main-header p { color: var(--text-muted); }
.content-placeholder { margin-top: 40px; padding: 40px; background-color: var(--bg-light-dark); border-radius: 12px; border: 1px solid var(--border-color); }

/* --- TARJETAS DE MÉTRICAS --- */
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 25px; }
.metric-card { background-color: var(--bg-light-dark); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); }
.metric-card h4 { color: var(--text-muted); font-size: 16px; font-weight: 500; margin-bottom: 10px; }
.metric-card .metric-value { font-size: 32px; font-weight: 600; color: var(--text-light); }

/*
--- REVISIÓN COMPLETA DE FORMULARIOS ---
*/
.form-card { background-color: var(--bg-light-dark); padding: 25px; border-radius: 12px; border: 1px solid var(--border-color); margin-bottom: 30px; }
.form-card h3 { margin-top: 0; margin-bottom: 25px; font-size: 18px; }
.form-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.form-group { flex: 1 1 30%; min-width: 250px; }
.form-group label { display: block; color: var(--text-muted); margin-bottom: 8px; font-size: 14px; font-weight: 500; }

/* ESTILO UNIFICADO PARA TODOS LOS INPUTS, SELECTS Y TEXTAREAS */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea { resize: vertical; min-height: 80px; }

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 67, 236, 0.2);
}

/* BOTONES */
button, .btn-primary { padding: 12px 25px; border: none; border-radius: 8px; background-image: var(--gradient); color: white; font-size: 15px; font-weight: 600; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; }
button:hover, .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(74, 67, 236, 0.3); }
.form-divider { border: none; border-top: 1px solid var(--border-color); margin: 25px 0; }

/* --- ESTILOS DE TABLAS --- */
.table-container { overflow-x: auto; }
.content-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.content-table thead tr { background-color: var(--bg-dark); color: var(--text-muted); text-align: left; font-weight: 600; text-transform: uppercase; font-size: 12px; }
.content-table th, .content-table td { padding: 15px 18px; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.content-table tbody tr { transition: background-color 0.2s; }
.content-table tbody tr:hover { background-color: var(--bg-dark); }
.content-table tbody tr:last-of-type { border-bottom: 2px solid var(--primary); }

/* INSIGNIAS DE ESTADO (STATUS BADGES) */
.status-badge { padding: 5px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; text-transform: capitalize; }
.status-activa, .status-disponible { background-color: rgba(3, 172, 19, 0.2); color: var(--success); }
.status-pausada { background-color: rgba(255, 165, 0, 0.2); color: var(--warning); }
.status-baneada, .status-usado { background-color: rgba(214, 40, 40, 0.2); color: var(--danger); }
.status-exitosa { background-color: rgba(74, 67, 236, 0.2); color: var(--primary); }

/* BOTONES DE ACCIÓN EN TABLAS */
.action-btn { display: inline-block; padding: 8px 12px; margin-right: 5px; border-radius: 6px; color: white; text-decoration: none; transition: opacity 0.2s; }
.action-btn:hover { opacity: 0.8; }
.btn-edit { background-color: #007bff; }
.btn-delete { background-color: #dc3545; }

/* --- ESTILOS PÁGINA DE BITÁCORA --- */
.highlight-text { color: var(--primary); }
.note-card { background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; margin-bottom: 20px; }
.note-header { border-bottom: 1px solid var(--border-color); padding-bottom: 10px; margin-bottom: 15px; color: var(--text-muted); font-size: 14px; }
.note-body p { margin-bottom: 10px; line-height: 1.6; word-break: break-word; white-space: pre-wrap; }
.note-body p:last-child { margin-bottom: 0; }
.note-body strong { color: var(--text-light); margin-right: 8px; }

.search-results-list { list-style: none; margin-top: 20px; }
.search-results-list li a { display: block; padding: 10px 15px; background-color: var(--bg-dark); border: 1px solid var(--border-color); border-radius: 5px; margin-bottom: 5px; text-decoration: none; color: var(--text-light); transition: background-color 0.2s, border-color 0.2s; }
.search-results-list li a:hover { background-color: var(--bg-light-dark); border-color: var(--primary); }

/* --- ESTILOS PARA LA PÁGINA DE AYUDANTE (Añadir al final de style.css) --- */

.identity-generator {
    margin-bottom: 25px;
}

.identity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.identity-item span {
    color: var(--text-muted);
}

.identity-item strong {
    font-size: 16px;
    color: var(--text-light);
}

.copy-btn {
    background: var(--bg-light-dark);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 13px;
    margin-left: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.copy-btn.copied {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.card-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.card-item {
    background-color: var(--bg-light-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.card-item-header {
    background-color: var(--bg-dark);
    padding: 12px 15px;
    font-weight: 600;
}

.card-item-body {
    padding: 15px;
}

.card-detail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.card-detail:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.card-detail span {
    color: var(--text-muted);
    font-size: 14px;
}
.card-detail strong {
    font-size: 15px;
}
.card-detail .copy-btn {
    padding: 5px 8px;
    font-size: 12px;
}
/* --- ESTILOS PARA CREADOR RÁPIDO Y ACORDEÓN (Añadir al final de style.css) --- */

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.accordion-radio {
    display: none; /* Ocultamos el radio button real */
}

.accordion-label {
    display: flex;
    justify-content: space-between;
    padding: 15px;
    background-color: var(--bg-dark);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.accordion-label:hover {
    background-color: var(--bg-light-dark);
}

/* Indicador visual de selección */
.accordion-radio:checked + .accordion-label {
    background-color: var(--primary);
    color: white;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: var(--bg-light-dark);
    padding: 0 15px;
}

.accordion-content p {
    margin-bottom: 10px;
}
.accordion-content p:last-child {
    margin-bottom: 0;
}
.accordion-content strong {
    color: var(--text-light);
}

/* Cuando el radio está seleccionado, se expande el contenido */
.accordion-radio:checked + .accordion-label + .accordion-content {
    max-height: 200px; /* Altura suficiente para el contenido */
    padding: 15px;
}
/* --- ESTILOS PARA DASHBOARD Y RECUPERACIÓN (Añadir al final) --- */

.alert-card {
    background-color: var(--bg-light-dark);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid;
    margin-top: 30px;
}
.alert-card.danger { border-color: var(--danger); }
.alert-card.notice { border-color: var(--warning); }
.alert-card h3 { margin-top: 0; margin-bottom: 15px; }

/* Nuevos status badges */
.status-en_recuperacion { background-color: rgba(0, 123, 255, 0.2); color: #007bff; }
.status-cobrado { background-color: rgba(40, 167, 69, 0.2); color: #28a745; }

/* Botones pequeños de acción */
.action-btn-small { display: inline-block; padding: 6px 12px; margin-right: 5px; border-radius: 6px; color: white; text-decoration: none; font-size: 13px; font-weight: 500; border: none; cursor: pointer; }
.btn-add-funds { background-color: #007bff; }
.btn-change-status { background-color: #6c757d; }
.btn-start-recovery { background-color: var(--warning); color: #1e1e2f; }
.btn-mark-collected { background-color: var(--success); }