* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #0f172a;
    color: #f8fafc;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #1e293b;
    border-bottom: 1px solid #334155;
}

.logo { font-size: 1.4rem; font-weight: 700; color: #38bdf8; }
.nav-right { display: flex; align-items: center; gap: 15px; }
.user-badge { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 0.95rem; }

/* Menú Desplegable (3 Rayas) */
.dropdown { position: relative; }

.btn-icon {
    background: #334155;
    color: #fff;
    border: none;
    font-size: 1.3rem;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-icon:hover { background: #475569; }

.dropdown-content {
    position: absolute;
    right: 0;
    top: 45px;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    width: 180px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    z-index: 100;
    overflow: hidden;
}

.dropdown-item {
    width: 100%;
    padding: 10px 15px;
    background: none;
    border: none;
    color: #f8fafc;
    text-align: left;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-item:hover { background: #334155; }
.dropdown-item.danger { color: #f87171; }
.dropdown-item.danger:hover { background: #ef444422; }

/* Botones Globale */
.btn-primary { background: #38bdf8; color: #0f172a; border: none; padding: 10px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s; }
.btn-primary:hover { background: #0284c7; color: #fff; }

.btn-primary-block { width: 100%; background: #38bdf8; color: #0f172a; border: none; padding: 12px; border-radius: 6px; font-weight: 600; cursor: pointer; margin-top: 10px; }
.btn-primary-block:hover { background: #0284c7; color: #fff; }

.btn-secondary { background: #334155; color: #fff; border: none; padding: 10px 18px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: #475569; }

.btn-danger { background: #ef4444; color: white; border: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.btn-danger:hover { background: #dc2626; }

/* Modales */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; z-index: 1000; }
.modal-backdrop { position: absolute; width: 100%; height: 100%; background: rgba(0,0,0,0.7); }
.modal-content { position: relative; background: #1e293b; padding: 30px; border-radius: 12px; width: 100%; max-width: 400px; border: 1px solid #334155; z-index: 1001; }
.close { position: absolute; right: 20px; top: 15px; font-size: 1.5rem; cursor: pointer; color: #94a3b8; }

.modal-content form { display: flex; flex-direction: column; gap: 12px; margin-top: 15px; }
.modal-content input { padding: 10px; background: #0f172a; border: 1px solid #334155; color: #fff; border-radius: 6px; }

/* Lista de usuarios modal */
.user-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 8px;
}

.user-item-info { font-weight: 600; font-size: 0.95rem; }
.badge-owner { background: #eab308; color: #0f172a; font-size: 0.75rem; padding: 2px 6px; border-radius: 4px; margin-left: 8px; }

.btn-delete-small {
    background-color: #ef4444;
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Panel Principal */
.main-container { max-width: 850px; margin: 40px auto; padding: 0 20px; }
.card { background: #1e293b; border-radius: 12px; border: 1px solid #334155; overflow: hidden; }
.card-header { background-color: #0f172a; padding: 15px 25px; border-bottom: 1px solid #334155; }
.card-body { padding: 25px; }

.controls-row { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; }
.controls-row input { padding: 8px; background: #0f172a; border: 1px solid #334155; color: #fff; border-radius: 6px; width: 80px; }

.output-area { display: flex; flex-direction: column; gap: 10px; }
textarea { width: 100%; height: 200px; background: #0f172a; border: 1px solid #334155; color: #38bdf8; font-family: monospace; padding: 12px; border-radius: 8px; resize: vertical; }

/* Estilos de los resultados BIN y CC */
#bin-result p {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: #94a3b8;
}

#bin-result span {
    color: #38bdf8;
    font-weight: 600;
}

/* Mensajes de feedback */
.error-msg { color: #f87171; font-size: 0.85rem; margin-top: 10px; text-align: center; }
.msg-box { margin-top: 10px; padding: 8px; border-radius: 6px; font-size: 0.85rem; text-align: center; }
.msg-box.success { background: #065f46; color: #a7f3d0; }
.msg-box.error { background: #991b1b; color: #fecaca; }
